diff --git a/cuda/matrix/csr_kernels.cu b/cuda/matrix/csr_kernels.cu index a5e84020282..57ab4191862 100644 --- a/cuda/matrix/csr_kernels.cu +++ b/cuda/matrix/csr_kernels.cu @@ -168,8 +168,8 @@ GKO_ENABLE_IMPLEMENTATION_SELECTION(select_merge_path_spmv, merge_path_spmv); template int compute_items_per_thread(std::shared_ptr 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 diff --git a/hip/matrix/csr_kernels.hip.cpp b/hip/matrix/csr_kernels.hip.cpp index b08f5532e47..df2494aa77a 100644 --- a/hip/matrix/csr_kernels.hip.cpp +++ b/hip/matrix/csr_kernels.hip.cpp @@ -181,8 +181,8 @@ int compute_items_per_thread(std::shared_ptr 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