You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add BLOCK_LOAD_STRIPED_VECTORIZE to cub::BlockLoad #12170
coalesced, then a shared-memory transpose to blocked
Proposal. Add BLOCK_LOAD_STRIPED_VECTORIZE: each thread loads vectors in a striped fashion. A warp's wide load then reads one contiguous, fully used segment, with no transpose. The resulting arrangement is not blocked, so this suits algorithms that don't depend on per-thread item order. Like BLOCK_LOAD_VECTORIZE, it should pick the widest word dividing ItemsPerThread * sizeof(T) (so non-power-of-two types work) and fall back when misaligned.
Motivation.DeviceFind hand-rolls exactly this load pattern, limited to power-of-two vector types. Replacing it with BLOCK_LOAD_VECTORIZE gives near-identical SASS, but the warp loads become strided, costing about 1% on 1–4 byte types on an RTX 5090. With the new algorithm, DeviceFind could drop its hand-written loads.
Other uses.agent_reduce (DeviceReduce, DeviceSegmentedReduce) and DeviceTransform's vectorized kernel hand-roll the same striped vector load, and agent_histogram approximates it with BlockLoad<VecT, ..., BLOCK_LOAD_STRIPED> over a manually chosen vector type.
Activity