Repository navigation
fix(sm120): correct ported GEMM and MQA execution paths - #9
Merged
Merged
Conversation
Signed-off-by: Zihua Wu <13583761+lucifer1004@users.noreply.github.com>
Signed-off-by: Zihua Wu <13583761+lucifer1004@users.noreply.github.com>
Move all SM120-specific regression tests out of upstream-owned test
files into tests/test_sm120_{bf16,fp8_fp4,einsum,hyperconnection,skip_head}.py
so the fork's tests/ directory stays byte-identical to dev on upstream
files (one documented exception: the cross-case tensor lifetime fix in
test_paged_mqa_logits). This removes every sync-conflict surface from
upstream's per-release rewrites of the shared test files.
All moved tests switch to upstream's call-time test_filter gating, so
non-SM120 machines see zero behavior change at collection, under
pytest, in test_sanitizer.py's direct-call discovery, and via __main__.
Each new file is a self-contained script with its own __main__ runner.
Signed-off-by: Zihua Wu <13583761+lucifer1004@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
Correct SM120 execution paths in
dev(audited baselinead1f1726), without importing missing nv_dev features or changing README/build configuration.Reproductions
The unmodified baseline exhibited K-grouped JIT failures, split-K dropping C, mixed gran128/128 K-tail omissions, stride/padding corruption, cross-group masked stores, skip-head output mapping failures, and incorrect FP8 MQA D32/D64 logits.
After fixing the scheduler member mismatch, full-SM randomized K-grouped tests exposed an additional descriptor-reuse race. On identical inputs and the same SM120 device, adding only the six descriptor lifecycle lines removed numerical and repeatability failures for both BF16 and FP8. Small-SM controls remained correct. Sanitizer instrumentation alone masked this failure, so the conclusion relies on ordinary A/B runs, not merely clean sanitizer output.
Validation
Standard standalone builds and external artifact imports passed. Source, dependency, native and packaged JIT-header identities were checked throughout; native hashes alone are insufficient for JIT-header fixes.
PYTORCH_ALLOC_CONF=expandable_segments:Trueand the included one-line test-lifetime cleanup. The final K-grouped-only increment leaves the 23 checked MQA source/test files byte-identical; all focused MQA checks were rerun on the final artifact.Qualification limits
This is not a claim that an unfiltered repository-wide suite is green:
C=Nonedirect-output combinations that this fork already rejects on SM120. Those full-node failures are retained. Supported-scope validation used an external enumerator filter; it did not change the committed generator or add the missing feature.NOT_SUPPORTEDor empty-score reporting division by zero. Separate correctness-only execution omits benchmark/reporting, not numerical checks, and does not overwrite those failures.Performance scope
Six-round paired measurements used a full 512 MiB read/write L2 eviction before each measured invocation (128 MiB L2). Measurements cover GPU activity spans of public calls, including applicable SF conversion, copies, metadata and reductions; they exclude Python/CPU allocator time. PDL was disabled, and input/output qualification was performed before and after measurement.
Percentages use the median of within-round latency ratios. Small profiler timestamp overlaps were retained without correction; there is no claimed absolute timestamp error bound, dynamic spill measurement or serving-throughput guarantee. Static LOCAL0 does not imply absence of local-memory instructions.