Conversation
…ard + shape fallbacks Upstream the managed CuTe DSL dispatcher test coverage that OSS lacked. This is a test-only change: the two source fixes these tests were written for -- the fused_add_rms_norm 3-D backward flatten fix (managed linkedin#18) and routing the dispatcher RoPE through the fused ops-layer CuTe DSL kernels (managed linkedin#20) -- are already present in OSS upstream (identical files), so no source changes are needed here. Adds three parity-vs-Triton suites under test/cutedsl/: - test_fused_add_rms_norm.py: dispatcher parity for the nvidia-cutedsl fused_add_rms_norm op across fp32/bf16, 2-D/3-D shapes, and in_place True/False, plus a focused 3-D fwd+bwd regression that used to crash with "ValueError: ... expected ndim=2" before the backward flatten fix. - test_gap_ops.py: parity coverage for the geglu, softmax, layer_norm, kl_div, jsd, and fused_linear_jsd dispatcher registrations plus the jsd_loss_and_grad primitive. Each cell is pinned as real CuTe DSL or a by-design Triton fallback and verified against the dispatcher's fallback signal so a cell can never silently compare Triton-vs-Triton. Real CuTe DSL parity is scoped to Blackwell (sm_100+); non-Blackwell archs cleanly skip. - test_shape_fallbacks.py: dispatcher shape-fallback coverage for softmax, kl_div, rms_norm, layer_norm, and fused_add_rms_norm, asserting the nvidia-cutedsl backend matches nvidia-triton on shapes that punt to Triton. All suites skip (never fail) when CUDA or nvidia-cutlass-dsl is unavailable. Collection verified: 45 tests collected; ruff check + format clean. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
arde171
force-pushed
the
arde/upstream-cutedsl-tests
branch
from
September 11, 2026 06:48
0d6349d to
6cdcce7
Compare
Collaborator
Author
|
The preliminary benchmark tables and derived speedup claims have been removed because the measurements were not sufficiently controlled. This PR adds test coverage only and makes no performance-improvement claim. |
Collaborator
Author
|
Update: the provisional performance figures referenced here have been removed. The correctness-test information is unchanged. |
Add independent PyTorch references, reject missing and vacuous gradients, and explicitly distinguish native paths from shape fallbacks. Cover isolated residual gradients and JSD masking and denominator contracts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
Add CuTe DSL correctness coverage in three test files. Runtime source is unchanged.
Testing Done
Exact commit
425650d645462aa804ee0e5d42d3559c70a3a3e5on NVIDIA B300, using an exclusive GPU lease:python -m pytest test/cutedsl/test_fused_add_rms_norm.py test/cutedsl/test_gap_ops.py test/cutedsl/test_shape_fallbacks.py86 passed, 0 failed, 0 skipped: 60 native CuTe DSL cases, 17 explicitly asserted Triton-fallback cases, and 9 CPU helper/reference cases. For fused-linear JSD, native attribution applies to the inner JSD primitive, not the shared projection or backward-scaling operations. Changed-file Ruff lint and formatting pass.
This is targeted correctness coverage, not full model convergence or cross-platform qualification. Hopper, AMD, and Intel execution remain unqualified by these B300 results. Maintainer approval and repository CI gates remain separate requirements.
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com