From cce16b08f3b29c9c7b5cd1add41c0701ce49f9fb Mon Sep 17 00:00:00 2001 From: Yunsong Wang Date: Tue, 14 Nov 2023 11:12:31 -0800 Subject: [PATCH] Fix pre-volta tests --- tests/static_map/insert_and_find_test.cu | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/static_map/insert_and_find_test.cu b/tests/static_map/insert_and_find_test.cu index 6d0e2567b..3afc27b9a 100644 --- a/tests/static_map/insert_and_find_test.cu +++ b/tests/static_map/insert_and_find_test.cu @@ -61,7 +61,14 @@ __global__ void parallel_sum(Ref v) } #if __CUDA_ARCH__ < 700 else { - v.insert(cuco::pair{i, gridDim.x * blockDim.x}); + auto constexpr cg_size = Ref::cg_size; + if constexpr (cg_size == 1) { + v.insert(cuco::pair{i, gridDim.x * blockDim.x}); + } else { + auto const tile = + cooperative_groups::tiled_partition(cooperative_groups::this_thread_block()); + v.insert(tile, cuco::pair{i, gridDim.x * blockDim.x / cg_size}); + } } #endif }