Skip to content

Commit

Permalink
Merge pull request #1340 from msimberg/concurrency-unused-cuda-handle…
Browse files Browse the repository at this point in the history
…-pool

Remove unused concurrency member variables from cublas and cusolver handles holders
  • Loading branch information
msimberg authored Nov 19, 2024
2 parents ae1de3d + b272be1 commit 96670ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 0 additions & 2 deletions libs/pika/async_cuda/include/pika/async_cuda/cuda_pool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ namespace pika::cuda::experimental {

struct cublas_handles_holder
{
std::size_t const concurrency;
std::atomic<std::size_t> handle_index;
std::vector<cublas_handle> handles;
std::vector<std::mutex> handle_mutexes;
Expand All @@ -101,7 +100,6 @@ namespace pika::cuda::experimental {

struct cusolver_handles_holder
{
std::size_t const concurrency;
std::atomic<std::size_t> handle_index;
std::vector<cusolver_handle> handles;
std::vector<std::mutex> handle_mutexes;
Expand Down
8 changes: 2 additions & 6 deletions libs/pika/async_cuda/src/cuda_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ namespace pika::cuda::experimental {
}

cuda_pool::cublas_handles_holder::cublas_handles_holder(std::size_t num_handles)
: concurrency(pika::detail::get_runtime_ptr() ? pika::get_num_worker_threads() :
pika::threads::detail::hardware_concurrency())
, handle_index{0}
: handle_index{0}
, handles()
, handle_mutexes(num_handles)
{
Expand Down Expand Up @@ -83,9 +81,7 @@ namespace pika::cuda::experimental {
}

cuda_pool::cusolver_handles_holder::cusolver_handles_holder(std::size_t num_handles)
: concurrency(pika::detail::get_runtime_ptr() ? pika::get_num_worker_threads() :
pika::threads::detail::hardware_concurrency())
, handle_index{0}
: handle_index{0}
, handles()
, handle_mutexes(num_handles)
{
Expand Down

0 comments on commit 96670ee

Please sign in to comment.