Skip to content

Add CUTLASS Exchange and block Shuffle - #11532

Open
tpn wants to merge 1 commit into
codex/cuda-coop-cutlass-05-scanfrom
codex/cuda-coop-cutlass-06-exchange-shuffle
Open

tpn wants to merge 1 commit into
codex/cuda-coop-cutlass-05-scanfrom
codex/cuda-coop-cutlass-06-exchange-shuffle

Conversation

@tpn

@tpn tpn commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Prerequisite: #11531.

CuTe kernels can rearrange per-thread payloads with common Exchange layout
conversions and block Shuffle shifts. Exchange supports blocks, physical
warps, and logical warps. Shuffle shifts the flattened blocked payload by one
item. Both return fresh payloads and preserve their inputs.

The qualified API adds block warp-striped layouts, rank-controlled scatters,
optional warp time slicing, and scalar Offset/Rotate. Shared planning and
exact layout probes determine scratch requirements; warp calls receive
independent group storage and synchronization. Documentation and executable
examples describe scatter rank preconditions, undefined holes and shift
boundaries, and participation. Type declarations distinguish common controls
from qualified extensions.

Validation

Tests compare layouts and scalar distances against independent references
across supported dtypes and logical widths. They also cover rank and flag
widths, divergent complete groups, payload preservation, and repeated reuse.
Focused race checks and final-cubin inspection cover scratch synchronization
and provider-call elimination. Installed-wheel consumers exercise the examples
and common/qualified typing.

These tests passed in the prior 12-layer tip's local regression on Linux with
CUDA 13.3 and SM 120, using a compatible development compiler. That
run covered the prior cumulative tip; intermediate PR heads have not been separately
rerun. Official public CUTLASS artifacts remain unqualified.

Final integrated regression: Passed: 879 shared-contract checks, 1,415 Numba host/compiler checks, 798 Numba GPU checks, seven standalone Numba commands, 1,757 CUTLASS host/compiler checks, and 2,136 CUTLASS GPU/compiler-lifecycle checks. Both GPU suites ran with race checking enabled; there were no failures or skips.
Final installed-wheel qualification: Fresh-wheel checks passed: all 252 Python sources/stubs match the final source, 40 packaging/typing tests passed, and base-only imports plus four mixed-backend activation cases passed. Installed GPU consumers passed 20 common/qualified example runs, four storage variants, runtime-first and disabled-auto-registration modes, and three executable guide tests.
Final documentation qualification: Full Sphinx rendered with only three existing libcu++ warnings; focused cooperative pages build without warnings. API signatures, 39 source excerpts, downloads, anchors, and local links pass. Local and live browser checks passed for 32 CUTLASS objects and all 14 explorers. The published docs match the tested source; 396 served resources match build hashes and the separate Numba docs remain unchanged.

Stack

Part 7 of 16 above #11392. Previous: #11531 · Next: #11533.
Complete stack and current common API coverage: #11541.

@copy-pr-bot

copy-pr-bot Bot commented Sep 21, 2026

Copy link
Copy Markdown
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.

Provide block and warp layout exchange, qualified block scatters, array
shifts, and scalar offset and rotate through shared lowering plans.
Preserve payloads and validate controls before narrowing their ABI.
Carry initialized ThreadData through CuTe loops and branches so repeated
collectives retain their payload and scratch reuse contracts.

Signed-off-by: Trent Nelson <trent@trent.me>
@tpn
tpn force-pushed the codex/cuda-coop-cutlass-06-exchange-shuffle branch from 94a5bcf to dd75f17 Compare September 21, 2026 04:31
@tpn
tpn marked this pull request as ready for review September 21, 2026 17:42
Copilot AI lite review requested due to automatic review settings September 21, 2026 17:42
@tpn
tpn requested review from a team as code owners September 21, 2026 17:42
@tpn
tpn requested review from griwes and jrhemstad and removed request for a team September 21, 2026 17:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@tpn

tpn commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor
Action performed

Full review triggered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

2 participants