Skip to content

Commit

Permalink
Fix GPU version computation
Browse files Browse the repository at this point in the history
  • Loading branch information
upsj committed May 19, 2020
1 parent 6e0d7ca commit 0e4fc49
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cuda/matrix/csr_kernels.cu
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ GKO_ENABLE_IMPLEMENTATION_SELECTION(select_merge_path_spmv, merge_path_spmv);
template <typename ValueType, typename IndexType>
int compute_items_per_thread(std::shared_ptr<const CudaExecutor> exec)
{
const int version = exec->get_major_version()
<< 4 + exec->get_minor_version();
const int version =
(exec->get_major_version() << 4) + exec->get_minor_version();
// The num_item is decided to make the occupancy 100%
// TODO: Extend this list when new GPU is released
// Tune this parameter
Expand Down
4 changes: 2 additions & 2 deletions hip/matrix/csr_kernels.hip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ int compute_items_per_thread(std::shared_ptr<const HipExecutor> exec)
#if GINKGO_HIP_PLATFORM_NVCC


const int version = exec->get_major_version()
<< 4 + exec->get_minor_version();
const int version =
(exec->get_major_version() << 4) + exec->get_minor_version();
// The num_item is decided to make the occupancy 100%
// TODO: Extend this list when new GPU is released
// Tune this parameter
Expand Down

0 comments on commit 0e4fc49

Please sign in to comment.