Skip to content

Commit 18ef371

Browse files
Fix a build warning with ARM (#503)
Fixes a build warning with ARM ```bash /home/coder/cuCollections/include/cuco/detail/static_map_kernels.cuh(446): warning #20054-D: dynamic initialization is not supported for a function-scope static __shared__ variable within a __device__/__global__ function 395 Value writeBuffer[block_size / tile_size]; --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent f166d18 commit 18ef371

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

include/cuco/detail/static_map_kernels.cuh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,11 @@ CUCO_KERNEL void find(
443443
auto tile = cg::tiled_partition<tile_size>(cg::this_thread_block());
444444
int64_t const loop_stride = gridDim.x * block_size / tile_size;
445445
int64_t idx = (block_size * blockIdx.x + threadIdx.x) / tile_size;
446+
#pragma nv_diagnostic push
447+
#pragma nv_diag_suppress static_var_with_dynamic_init
448+
// Get rid of a false-positive build warning with ARM
446449
__shared__ Value writeBuffer[block_size / tile_size];
450+
#pragma nv_diagnostic pop
447451

448452
while (idx < n) {
449453
auto key = *(first + idx);

0 commit comments

Comments
 (0)