cuda.coop: plan storage by cooperative group scope - #11203
Draft
tpn wants to merge 2 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-block-load-store-algorithms
branch
from
September 4, 2026 16:52
8ecfb54 to
39755f7
Compare
tpn
force-pushed
the
codex/cuda-coop-numba-group-storage-scopes
branch
from
September 4, 2026 16:52
59b7629 to
47c148d
Compare
tpn
force-pushed
the
codex/cuda-coop-numba-block-load-store-algorithms
branch
from
September 4, 2026 17:54
39755f7 to
a4d8965
Compare
Carry the resolved lowering plan through the generic provider marker. The before-inference rewrite can then lay out shared storage by execution topology. Allocate aligned slices per block, warp, logical warp, or thread. Derive reuse barriers and logical-warp masks from plan metadata. Keep caller-owned block descriptors unchanged, and fail closed for unrepresentable scopes or inconsistent contracts. Signed-off-by: Trent Nelson <trent@trent.me>
Extend the lazy registered family across storage-free, block, warp, logical-warp, and per-thread providers without changing dispatch. Assert aligned per-instance slices, x-major ranks, subgroup masks, barrier selection, reuse isolation, caller-storage rejection, and removal of planner-only metadata from rewritten IR. Signed-off-by: Trent Nelson <trent@trent.me>
tpn
force-pushed
the
codex/cuda-coop-numba-group-storage-scopes
branch
from
September 4, 2026 17:56
47c148d to
53a60ea
Compare
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
PR #11200 completes CUB Block Load and Store, but later cooperative families
need one CTA to contain several independent execution groups. Treating
temporary storage as one block-wide slice would make Warp providers alias
storage and synchronize at the wrong scope.
This PR carries the resolved lowering plan through the generic provider marker
so storage layout and synchronization follow the concrete group topology.
Reviewer-visible behavior
logical warp, or thread.
synchronization are compatible.
syncthreads, Warp providers emitsyncwarpwith theappropriate subgroup mask, and thread-scoped providers emit no barrier.
TempStorageretains the existing single-blockshared/exclusive contract.
provider compilation.
and synchronization are both block-scoped.
do not describe the resolved group.
Extensibility proof
A lazily registered test family exercises portable and qualified callable
identity, storage-free and storage-bearing providers, scalar/array/pair
results, physical and logical Warp groups, per-thread storage, x-major ranks,
subgroup masks, and registry cleanup. It requires no changes to activation,
root dispatch, provider caching, header selection, or primitive-family code.
Validation
The exact final-stack head
9b299e894f, which includes this layer, passed:tests outside the source tree.
Stack and scope
This draft is stacked on #11200, which is stacked on #11182. It adds the
generic per-execution-group storage and synchronization seam only. Public Warp
Load/Store APIs and providers are introduced by the next PR.