In this article
A partial radix key is a slice of the sortable representation, not necessarily the original floating-point bit pattern.
Sorting fewer bits changes the key definition
A GPU ranking stage may use cub::DeviceRadixSort and restrict begin_bit and end_bit to reduce the compared key domain. For floating-point inputs, those indices should not be interpreted as a direct request to compare an arbitrary field of the original representation.
The DeviceRadixSort reference describes transformations used to create radix-sortable keys. The referenced development documentation and repository branch should be matched to the installed CCCL version.
Transformation precedes bit truncation
The implementation header documentation specifies that type-specific transformations happen before restriction to the selected bit interval. Positive floating-point values invert the sign bit; negative values invert the complete key for ascending ordering.
Therefore, a partial-bit comparison defines equivalence in transformed-key space. It need not express the application notion of rounding, numeric buckets, or similarity. If bucketing is the intended algorithm, define its key explicitly and verify that its ordering matches the required semantics.
Stability concerns the compared key
Stable sorting preserves input order among keys considered equal by the sorting operation. When only a bit subrange participates, different original values can compare equal within that subrange. Their retained input order is not evidence of a hidden full-value secondary sort.
For key-value sorting, attach original item identities and verify that values follow their keys. The tensor-axis guide provides a related principle: an array position and an application identity are different pieces of metadata.
Special floating-point values need explicit expectations
The documented contract treats positive and negative zero as equivalent and describes NaN ordering through transformed bit representations rather than a separate semantic NaN policy. An application that needs missing scores first or last should establish that policy before relying on numeric-looking output.
The official custom-key example illustrates the importance of bit-ordered representation. It is an explanatory example, not a universal prescription for missing-value handling.
Test ordering and identity together
Construct cases with repeated compared keys, mixed signs, both zero signs, and relevant non-finite values. Compare against a host reference implementing the same transformation and selected interval, not an ordinary full floating-point sort.
Record key type, interval, direction, and CCCL revision in the GPU evidence record. A shorter sort interval is an algorithmic choice whose correctness must be established before its performance is evaluated.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.