cuda.coop: add Numba Exchange and Shuffle - #11208
Draft
tpn wants to merge 8 commits into
Draft
Conversation
Contributor
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
tpn
force-pushed
the
codex/cuda-coop-numba-logical-warp-load-store
branch
2 times, most recently
from
September 4, 2026 18:05
a1439f9 to
8ac30b9
Compare
Define backend-neutral CUB BlockExchange, WarpExchange, and BlockShuffle specializations. Add portable group contracts for out-of-place results, storage, synchronization, and preconditions. Signed-off-by: Trent Nelson <trent@trent.me>
Register family-owned inference and provider selection for block and Warp Exchange plus block Shuffle. Lower storage-bearing CUB calls with scope-aware reuse barriers, input preservation, checked runtime Rotate distances, and exact logical-Warp masks. Signed-off-by: Trent Nelson <trent@trent.me>
Exercise installed-wheel exports, strict typing, metadata, and package contents for both portable and qualified APIs. Cover invalid selectors, payloads, ranks, flags, and scalar Shuffle calls. Signed-off-by: Trent Nelson <trent@trent.me>
Describe supported layouts, scatter preconditions, storage ownership, barriers, Shuffle boundaries, and runtime Rotate traps. Update API coverage without promising deferred boundary results. Signed-off-by: Trent Nelson <trent@trent.me>
State the signed int32 provider ABI for Offset and distinguish ABI overflow traps from ordinary out-of-block source behavior. Exercise both overflow directions in isolated subprocesses. Signed-off-by: Trent Nelson <trent@trent.me>
Require string selectors across portable and qualified APIs, including planner, rewrite, and provider validation. Reuse the portable Exchange mode alias and keep qualified extensions block-only so Warp retains the shared layout contract. Signed-off-by: Trent Nelson <trent@trent.me>
Accept structural read-only payloads for Exchange and Shuffle inputs, including Exchange ranks and valid flags. Keep mutable result typing for both portable and qualified APIs. Reject enum-backed modes and distance compatibility objects before provider selection so runtime validation matches literal-only stubs. Signed-off-by: Trent Nelson <trent@trent.me>
tpn
force-pushed
the
codex/cuda-coop-numba-exchange-shuffle
branch
from
September 4, 2026 18:10
7587282 to
03793c5
Compare
Mirror portable input and result annotations in qualified markers. Keep Block Exchange ranks and flags as qualified-only controls. Treat time slicing the same way and assert the shared runtime contract. Signed-off-by: Trent Nelson <trent@trent.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why this is needed
The preceding stack extends Load and Store through block, physical-Warp, and
logical-Warp providers. This PR adds Exchange and Shuffle as independently
registered primitive families, exercising the provider, result, storage, and
synchronization seams without changing generic activation, dispatch, caching,
or phase orchestration.
Reviewer-visible behavior
exchangefor block, physical-Warp, and logical-Warpstriped/blocked layout conversion.
warp-striped, scatter, guarded/flagged, ranks/flags, and warp-time-slicing
extensions.
exposed for Warp groups.
shufflefor unitupanddownoperations.scalar
offsetandrotateforms.including ranks that CUB may modify internally.
block or exact-mask Warp reuse synchronization and disjoint slices per
logical group.
runtime distance ABIs are validated before provider specialization.
Validation
9b299e894fpassed 607 contract, packaging,public-surface, and activation tests outside the source tree.
runtime tests on an RTX PRO 6000.
git diff --checkpassed.Stack and scope
This draft is stacked on #11207. Shuffle boundary-output projections, Reduce,
Scan, callbacks, and Python operator compilation remain deferred.
Invalid runtime
rotatebounds and runtimeoffsetvalues outside thesigned-32-bit provider ABI trap the device and invalidate that CUDA context;
the implementation tests these paths in isolated processes.