Repository navigation
Closed
Description
Is this a duplicate?
- I confirmed there appear to be no duplicate issues for this bug and that I agree to the Code of Conduct
Type of Bug
Something else
Component
CUB
Describe the bug
compute-sanitizer --tool racecheck --check-device-heap yes --leak-check full --padding 512 --track-stream-ordered-races all --check-warpgroup-mma yes --require-cuda-init no --check-exit-code yes --error-exitcode 1 --nvtx true /home/coder/cccl/build/cuda12.4-gcc13/cub-cpp17/bin/cub.cpp17.test.device_run_length_encode_non_trivial_runs.lid_0
========= COMPUTE-SANITIZER
========= Error: Race reported between Write access at void cub::CUB_200500_600_700_800_NS::detail::WarpExchangeSmem<cub::CUB_200500_600_700_800_NS::KeyValuePair<int, int>, (int)15, (int)32>::ScatterToStriped<cub::CUB_200500_600_700_800_NS::KeyValuePair<int, int>, int>(const cub::CUB_200500_600_700_800_NS::KeyValuePair<int, int> (&)[15], T1 (&)[15], T2 (&)[15])+0x2b80 in /home/coder/cccl/cub/cub/warp/specializations/warp_exchange_smem.cuh:153
========= and Write access at void cub::CUB_200500_600_700_800_NS::detail::WarpExchangeSmem<cub::CUB_200500_600_700_800_NS::KeyValuePair<int, int>, (int)15, (int)32>::ScatterToStriped<cub::CUB_200500_600_700_800_NS::KeyValuePair<int, int>, int>(const cub::CUB_200500_600_700_800_NS::KeyValuePair<int, int> (&)[15], T1 (&)[15], T2 (&)[15])+0x2b50 in /home/coder/cccl/cub/cub/warp/specializations/warp_exchange_smem.cuh:153 [2 hazards]
========= and Write access at void cub::CUB_200500_600_700_800_NS::detail::WarpExchangeSmem<cub::CUB_200500_600_700_800_NS::KeyValuePair<int, int>, (int)15, (int)32>::ScatterToStriped<cub::CUB_200500_600_700_800_NS::KeyValuePair<int, int>, int>(const cub::CUB_200500_600_700_800_NS::KeyValuePair<int, int> (&)[15], T1 (&)[15], T2 (&)[15])+0x2b80 in /home/coder/cccl/cub/cub/warp/specializations/warp_exchange_smem.cuh:153 [48 hazards]
========= and Write access at void cub::CUB_200500_600_700_800_NS::detail::WarpExchangeSmem<cub::CUB_200500_600_700_800_NS::KeyValuePair<int, int>, (int)15, (int)32>::ScatterToStriped<cub::CUB_200500_600_700_800_NS::KeyValuePair<int, int>, int>(const cub::CUB_200500_600_700_800_NS::KeyValuePair<int, int> (&)[15], T1 (&)[15], T2 (&)[15])+0x2bb0 in /home/coder/cccl/cub/cub/warp/specializations/warp_exchange_smem.cuh:153 [3 hazards]
=========
How to Reproduce
compute-sanitizer --tool racecheck --check-device-heap yes --leak-check full --padding 512 --track-stream-ordered-races all --check-warpgroup-mma yes --require-cuda-init no --check-exit-code yes --error-exitcode 1 --nvtx true /home/coder/cccl/build/cuda12.4-gcc13/cub-cpp17/bin/cub.cpp17.test.device_run_length_encode_non_trivial_runs.lid_0
Expected behavior
No diagnostics emitted.
Reproduction link
No response
Operating System
No response
nvidia-smi output
No response
NVCC version
No response
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsDone
Activity
alliepiper commentedon Nov 8, 2024
I think we'll need to suppress this as well.
DeviceRLE internally performs a
WarpExchange::ScatterToStripedthat 'discards' items by scattering them to the same position in the output. This output location is not used, and simply serves as a way to throw away items that aren't needed in the output.Since the same memory location is written to multiple times, it's generating these WAW warnings.
We could refactor the algorithm to avoid these WAW by either (a) adding a
ScatterToStripedMaskthat lets us stencil out the discarded values, or by ensuring that each discarded element is written to a unique location in shmem (there should be enough memory allocated). However, each of these would introduce perf penalties that aren't worthwhile.So, we'll just suppress these.
alliepiper commentedon Nov 15, 2024
Added a suppression #1879 .