Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/25341
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 5c79998 with merge base 9f49fe2 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
[ghstack-poisoned]
|
@claude /pr-review |
|
Claude finished @Gasoonjia's task in 23m 30s —— View job PR #25341 review: Reading the code turned up no numerical bug in the new NVFP4 W4A16, GEMV and embedding kernels, but none of the new kernels run in any CI job, the per-row global scale and HALF2/native variants go untested even on capable GPUs, and Detailed reviewPR Review: #25341SummaryThe PR adds I read the kernels against the existing W4A4 code and the packer, covering nibble order, E4M3 decode, masks, int64 offsets and the split-K reduce, and found no numerical bug. The problems are:
No GPU was available, so I ran none of the tests. The performance points below are marked as suspected. Code Quality
Infrastructure
Testing
API Design
Performance
RecommendationRequest Changes. Before landing:
The remaining items are minor. |
…code down so A100 CI runs the NVFP4 kernels [ghstack-poisoned]
|
Thanks. Round 6: the commit message is current: no benchmark sentence, and it has a full test plan. The test plan now gives the hardware coverage. At this commit the kernel tests need SM89+, and they ran on an RTX 5090, including |
|
@claude /pr-review |
|
Claude finished @Gasoonjia's task in 41m 5s —— View job PR #25341 re-review (round 7)
Approve: no numerical bug or blocker at Detailed reviewPR Review: #25341SummaryAdds NVFP4 W4A16 GEMM, small-M GEMV and embedding Triton kernels, registered as Code Quality
Infrastructure
Testing
API Design
Performance
RecommendationApprove. Nothing in the code blocks merge. CI can't run these tests (see Infrastructure), so this approval rests on the author's own SM89+ and SM120 runs; please record them in the PR body. The most valuable code follow-up is the compile test. It is the only thing that would catch removal of the |
[ghstack-poisoned]
|
Thanks. Round 7: no changes beyond the rebase. The other items are deferred. |
|
@claude /pr-review |
|
Claude finished @Gasoonjia's task in 24m 33s —— View job PR #25341 re-review (round 8)
Approve: the diff is unchanged since round 7 apart from the rebase and has no correctness bug; the one new, minor item is that the pinned-variant tests use K=512, so Detailed reviewPR Review: #25341SummaryAdds NVFP4 W4A16 GEMM, small-M GEMV and embedding Triton kernels to the CUDA backend, with pinned-variant and launch-validation tests. The PR's own diff stats match round 7 (same four files, +1019/−9), which agrees with your note that only the rebase changed. No correctness bug was found. The one new item is minor test coverage, below. The round-7 items you deferred are unchanged at this head and aren't repeated. Testing
RecommendationApprove Nothing blocks. The code is unchanged since round 7, and the one new item is a minor coverage gap with a one-line fix. |
[ghstack-poisoned]
|
CI update: the A10G Authored with Claude Code. |
|
@claude /pr-review |
|
Claude finished @Gasoonjia's task in 33m 51s —— View job PR #25341 re-review (round 9)
Approve: round 9 only changes the split-K test parametrization and turns up no correctness problems; two new minor test gaps remain (weight offsets above 2³¹ bytes are never exercised, and Detailed reviewPR Review: #25341SummaryAdds Triton NVFP4 W4A16, small-M GEMV (split-K, native SM120 E2M1 decode) and embedding kernels, with tests. Since round 8 the only change is the Testing
RecommendationApprove Both findings are minor coverage gaps; neither blocks merging. |
[ghstack-poisoned]
|
Authored with Claude Code. |
Stack from ghstack (oldest at bottom):
Adds W4A16 matrix multiplication, decode GEMV, and embedding kernels for packed NVFP4 weights, including native paired decoding and scalar/per-row global-scale support.
nvfp4_gemv(unit_scale=True)skips the global scale and relies on theCudaNVFP4Tensor.unit_scalecontract; the GEMV output keepsx.dtype. W4A16 computes FP32 activations in BF16. Eager embedding outside CUDA-graph capture rejects out-of-range ids; compiled graphs return zero rows for them. All three ops reject malformed operands (the embedding also non-integer or wrong-device ids), the GEMV rejects more than 65535 rows (grid axis 1), weight addresses use int64 offsets, and W4A16 validates its launch before casting FP32 activations. W4A16 and the GEMV pass M's upper bound into their autotuned split-K launch like W4A4. Thetest_nvfp4_w4a4target becomestest_nvfp4_kernels.Kernel tests cover both GEMM modes, activation quantization, GEMV, embedding, per-row global scales, split-K, and large-workspace addressing, and launch every GEMV/W4A16 decode variant (native/software, HALF2, row scales, unit scale) with pinned constexprs instead of relying on the autotuner's pick. These kernels decode scales with native E4M3 until the software decode later in the stack, so CI (A100/A10G) skips them here; everything, including the SM120-only native variants, was run on an RTX 5090.
Authored with Claude Code.
Differential Revision: D132997505