CUB_DISABLE_TOPK_UNSUPPORTED_ARCH_ASSERT#

CUB_DISABLE_TOPK_UNSUPPORTED_ARCH_ASSERT#

Specific to cub::DeviceBatchedTopK (it has no effect on any other CUB algorithm).

By default, cub::DeviceBatchedTopK fails at compile time (via static_assert) when the requested configuration cannot be served on every compute capability the translation unit is being compiled for. Some requests (a deterministic result, or a segment too large for the single-block backend) require the SM90+ cluster backend, so they cannot compile when a pre-SM90 compute capability is among the targets.

Define this macro (before including any CUB header) to suppress that compile-time check and defer the diagnosis to runtime instead: on a device that cannot serve the request, dispatch returns cudaErrorNotSupported. This is useful when a single translation unit must compile the full configuration space across a mix of compute capabilities and decide what is runnable at runtime. CUB’s own tests and benchmarks define it for this reason.