Skip to content

Commit

Permalink
Test cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
PointKernel committed Dec 13, 2023
1 parent 4080ea5 commit a2eb6d6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/static_map/shared_memory_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,13 @@ TEMPLATE_TEST_CASE_SIG("Shared memory static map",
auto constexpr cg_size = 1;
auto constexpr window_size = 1;

template <typename Key, typename Value, std::size_t NumWindows>
template <std::size_t NumWindows>
__global__ void shared_memory_hash_table_kernel(bool* key_found)
{
using Key = int32_t;
using Value = int32_t;
using slot_type = cuco::pair<Key, Value>;

__shared__ cuco::experimental::window<slot_type, window_size> map[NumWindows];

using extent_type = cuco::experimental::extent<std::size_t, NumWindows>;
Expand Down Expand Up @@ -211,15 +214,14 @@ __global__ void shared_memory_hash_table_kernel(bool* key_found)
}
}

TEMPLATE_TEST_CASE("static map shared memory slots.", "", int32_t)
TEST_CASE("static map shared memory slots.", "")
{
constexpr std::size_t N = 256;
auto constexpr num_windows = cuco::experimental::make_window_extent<cg_size, window_size>(
cuco::experimental::extent<std::size_t, N>{});

thrust::device_vector<bool> key_found(N, false);
shared_memory_hash_table_kernel<TestType, TestType, num_windows.value()>
<<<8, 32>>>(key_found.data().get());
shared_memory_hash_table_kernel<num_windows.value()><<<8, 32>>>(key_found.data().get());
CUCO_CUDA_TRY(cudaDeviceSynchronize());

REQUIRE(cuco::test::all_of(key_found.begin(), key_found.end(), thrust::identity<bool>{}));
Expand Down

0 comments on commit a2eb6d6

Please sign in to comment.