Repository navigation
[cutedsl] Launch local grid joins cooperatively - #4754
Merged
Merged
Conversation
choijon5
force-pushed
the
choijon5/helion-b200/shared/5
branch
from
November 26, 2026 16:22
6cd771f to
650f18b
Compare
choijon5
force-pushed
the
choijon5/helion-b200/shared/6
branch
from
November 26, 2026 16:22
da1d25a to
29e8749
Compare
This was referenced Nov 26, 2026
choijon5
marked this pull request as draft
November 26, 2026 17:03
choijon5
force-pushed
the
choijon5/helion-b200/shared/6
branch
from
November 26, 2026 17:03
29e8749 to
aa1869e
Compare
choijon5
marked this pull request as ready for review
November 26, 2026 17:04
jansel
approved these changes
Nov 27, 2026
…vice A direct config for a B200 could validate against the current H100 even while it recorded the B200's 148 SMs. Direct configuration under a simulated CuTe target could also observe the host capability or only one SM while a bound kernel correctly used the simulated facts. Read the canonical capability from its module at query time. The explicit-device hook delegates to the existing no-argument backend hook by default; CuTe probes the requested device unless the existing hook was overridden. Bound-kernel facts, including an explicit None, take priority. A nonexistent visible CUDA ordinal gives an unknown capability. Detect it on Torch's specific invalid-device assertion, then confirm it is out of range: successful queries keep their cache fast path, and unrelated driver or initialization errors still propagate. Model both direct and bound SM counts in the target context. Hide the indexed capability reader itself in the unavailable-CUDA fixture, so it neither fills the process's real cache with None nor exposes a warm entry; an outer modeled public probe remains authoritative. A CUDA process using PyTorch's NVML-based check can regain visibility before CUDA initializes. Return None for the unavailable probe without caching it: the next request can read the device, and a successful cached explicit lookup needs no further availability or property checks. The flash and config tests that used the former private search-surface probe now patch the canonical name; the redundant resource-test patch is gone. Testing: Scoped scripts/run_tests.py CPU configuration, helper and flash lanes passed 548 (20 skipped) CuTe and 143 (7 skipped) stable CI Triton. Strict lint and Pyrefly passed. The cold zero-to-one test previously returned None twice; now no absent entry is cached, the restored ordinal gives SM100, and no CUDA availability or property call is made on the next hit. Current-H100/requested-B200 gives SM90/120 and SM100/148; explicit None gives None/148. Class, subclass and plugin overrides, outer facts and the one-visible-device invalid-ordinal controls are exercised. The 25,987 full standalone CuTe CPU passes (567 skips) were on an earlier revision; the current counts above refer to the scoped tests. Integrated validation before changing the unavailable-cache miss to be retried: full CuTe lanes passed 26,211 CPU and 16,138 GPU tests on B200 3/5; full Triton lanes passed 4,900 CPU and 3,395 GPU tests on B200 6; Pallas interpreter passed 269 with 44 skipped. These runs include the requested-device, unavailable-ordinal, legacy-hook and fixture fixes. The final cache correction also passed the real zero-to-one transition on B200 4 with PyTorch's NVML-based availability check. No CUDA context was initialized while hidden; exposing the device then gave SM100/148 rather than a cached unknown. The separate real one-visible-device control returned unknown for a missing ordinal and left the visible target correct before and after a cold or warm simulated scope. Review notes: - Deferred: tensor-descriptor admission still uses the current device, including for a bound spec which already supplies the requested capability on upstream main. KNOWN_GAPS.md, tensor-descriptor-choices-use-the-current-gpu. Fixing only the search menu would leave lowering and epilogue decisions inconsistent across heterogeneous targets. Both configuration directions were reproduced; the single-B200 presets do not exercise that hardware mismatch. autoreview passed: claude, codex stack-info: PR: #4750, branch: choijon5/helion-b200/shared/2
…tion A resumed review twice returned its unique completion marker followed by LGTM. The reviewer had been told that both the verdict and the transport marker must be the last line. Spell out which belongs to the review text and which finishes the entire message. Keep the result parser and its confirmation check unchanged; previously rejected reviews remain unconfirmed. Testing: scripts/run_tests.py --backend triton --lane cpu --slow test/test_autoreview.py passed all 157 cases, including a verdict after the marker that must remain unconfirmed. Strict lint and Pyrefly passed. No GPU needed. autoreview passed: claude, codex stack-info: PR: #4751, branch: choijon5/helion-b200/shared/3
The kernel timer resizes a short profiling window using the first trace's observed call period. A second window can still end before warmup if calls arrive much faster. In the full Triton lane, both 15- and 113-call traces parsed, but neither settled; the timer correctly returned infinity. A test using CUDA sleeps and a wall-time threshold assumed it would always obtain a reading. Use the existing simulated device events to exercise the same timer, flush learning, trace parsing and resize logic. Check that the second window is larger and returns just the candidate's 7 us when calls settle, and that it reports an unreadable window when they do not. Neighboring tests still exercise real CUPTI traces and public do_bench. No timer behavior or production timeout changes. Testing: scripts/run_tests.py --backend triton,cute --lane cpu test/test_benchmarking_batched_replay.py (10 passed on each backend); strict scoped lint passed. No GPU required for this change. autoreview passed: claude, codex stack-info: PR: #4752, branch: choijon5/helion-b200/shared/4
The grouped seed test renders 120 or 140 complete CuTe programs in a single pytest item for each input shape. Under concurrent CPU suites one item lost its worker at the 180-second timeout, then passed alone in 71s. Keep the existing three IDs for the seed-prefix, default, normalization and geometry checks. Render the same first representative of each worklist geometry and L2 swizzle in eight disjoint slices per shape. The module-scoped fixture shares bindings on each worker without keeping the target mocks active between tests; its yield keeps the original input tensors alive during rendering. No scheduling code, timeout or MN test tier changes. Keep the shared offset and negative K-loop kernels and their argument and config builders in helion._testing. Place the eight K-loop refusal cases and the full P2 source journal in a CPU-only module. Preserve the three original modules' GPU coverage and the P2 journal payload verbatim. P2 still skips an incomplete CuTe SDK. Testing: the CuTe CPU lane passed 141 cases, including all 400 renders and all nine relocated source checks with CUDA hidden. The Triton CPU seed module passed 26 with one skip. Compared with main, 79 of the original 88 GPU-lane test IDs remain; the other nine now run on CPU. All eight original journal entries were unchanged. An independent inventory matched the 400 normalized render arguments (140, 140, 120) and checked the input weakrefs after collection and at each render. On the complete SDK the nine moved tests passed again, and P2 correctly skipped a simulated installation without cutlass.cute. Strict lint and Pyrefly passed. No GPU was allocated. autoreview passed: claude, codex stack-info: PR: #4753, branch: choijon5/helion-b200/shared/5
Select a cooperative launch when the final generated device body calls a local grid barrier, including a call nested in control flow. The launch descriptor and disk cache key distinguish those kernels. Other launches keep their existing behavior. Read local barrier calls from the generated body before outlining the two cluster fallback alternatives. The launch attributes still describe the actual device program when the entry body delegates to helpers. Testing: on this commit, scripts/run_tests.py --backend cute --gpus 0 --slow test/test_barrier.py test/test_cute_min_blocks_carveout.py passed 13 CPU and 29 B200 GPU cases (one GPU skip). No standalone performance claim is made for this launch change. After integrating upstream #4739, the actual fallback cluster, its standalone helper, and split-K GEMMs passed against PyTorch on B200 4. autoreview passed: claude, codex stack-info: PR: #4754, branch: choijon5/helion-b200/shared/6
choijon5
marked this pull request as draft
November 28, 2026 04:14
choijon5
changed the base branch from
choijon5/helion-b200/shared/5
to
choijon5/helion-b200/shared/4
November 28, 2026 04:14
choijon5
force-pushed
the
choijon5/helion-b200/shared/6
branch
from
November 28, 2026 04:14
aa1869e to
ccc305c
Compare
choijon5
changed the base branch from
choijon5/helion-b200/shared/4
to
choijon5/helion-b200/shared/5
November 28, 2026 04:14
choijon5
marked this pull request as ready for review
November 28, 2026 04:14
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.
Stacked PRs:
[cutedsl] Launch local grid joins cooperatively
Select a cooperative launch when the final generated device body calls a
local grid barrier, including a call nested in control flow. The launch
descriptor and disk cache key distinguish those kernels. Other launches
keep their existing behavior.
Read local barrier calls from the generated body before outlining the two
cluster fallback alternatives. The launch attributes still describe the
actual device program when the entry body delegates to helpers.
Testing: on this commit, scripts/run_tests.py --backend cute --gpus 0
--slow test/test_barrier.py test/test_cute_min_blocks_carveout.py passed
13 CPU and 29 B200 GPU cases (one GPU skip). No standalone performance
claim is made for this launch change.
After integrating upstream #4739, the actual fallback cluster, its
standalone helper, and split-K GEMMs passed against PyTorch on B200 4.
autoreview passed: claude, codex