NVIDIA / NVIDIA/cccl

`DeviceSegmentedRadixSortKernel` uses `volatile` temporary storage

Open
#7,846 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.5k
Forks
486
Avg merge
2d 6h
Merged PRs (30d)
295

Description

`DeviceSegmentedRadixSortKernel` uses `volatile` temporary storage:
https://github.com/NVIDIA/cccl/blob/a0a6bfdb5bd7339faa308000db438660df204db4/cub/cub/device/dispatch/kernels/kernel_segmented_radix_sort.cuh#L142-L151

This is at best a code smell, but probably either buggy and inefficient (disabled optimizations). The use of `volatile` should be replaced by proper loads and stores, atomic or regular, as needed and in accordance with the memory model.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.