Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/25338
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 Unclassified FailureAs of commit 136c148 with merge base 9f49fe2 ( UNCLASSIFIED FAILURE - DrCI could not classify the following job because the workflow did not run on the merge base. The failure may be pre-existing on trunk or introduced by this PR:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
[ghstack-poisoned]
This PR needs a
|
|
@claude /pr-review |
|
Claude finished @Gasoonjia's task in 21m 26s —— View job Requesting changes: nothing owns the NVFP4 per-tensor Detailed reviewPR Review: #25338SummaryThis PR teaches
The test gating and the 0xff reference coverage are also weaker than the test comments claim. API Design
Testing
Code Quality
RecommendationRequest Changes Items 1–3 block approval:
The other items are small. I couldn't run Python or the tests in this environment, so every finding comes from reading the code. All five changed files were reviewed.
|
…code down so A100 CI runs the NVFP4 kernels [ghstack-poisoned]
[ghstack-poisoned]
|
Thanks. Round 6: |
|
@claude /pr-review |
|
Claude finished @Gasoonjia's task in 19m 39s —— View job Approve. Nothing blocks. Four minor items remain:
Detailed reviewPR Review: #25338 (round 7)SummaryThis PR loads GGML NVFP4 blocks as Code Quality
Testing
RecommendationApprove Nothing blocks. Items 1, 2 and 4 are minor, and item 3 is a style nit. I couldn't run Python here, so every finding comes from reading the code. All eight changed files were reviewed.
|
|
Thanks. Round 7: no changes beyond the rebase. |
|
@claude /pr-review |
|
Claude finished @Gasoonjia's task in 28m 55s —— View job Approve. Nothing blocks. The four minor round-7 items are unchanged, and there is one new minor item: the Detailed reviewPR Review: #25338 (round 8)SummaryThis PR loads GGML NVFP4 blocks as
API Design
RecommendationApprove Nothing blocks. The new item and the four round-7 items are all minor. I couldn't run Python here, and the torchao, gguf-py and ggml sources weren't available, so every finding comes from reading the code. All eight changed files were reviewed.
|
|
Rebased onto the upstream GGUF rework (#25497 stack, now on main). NVFP4 loading now follows its design instead of keeping parallel tables.
Authored with Claude Code. |
|
@claude /pr-review |
|
Claude finished @Gasoonjia's task in 20m 18s —— View job Request changes: the PR branch is still the round-6 revision Detailed reviewPR Review: #25338 (round 9)SummaryThis PR loads GGML NVFP4 blocks as Backward Compatibility
RecommendationRequest Changes Nothing on the branch includes the rebase, so neither this review nor OSS CI has checked it. Push it and request review again. The revision now on GitHub conflicts with I couldn't review the rebased code, so none of its changes have been checked. That includes whether the minor items from rounds 7 and 8 still apply. Python couldn't be run here. This finding comes from reading the head, its base, and
|
Stack from ghstack (oldest at bottom):
ExportableGGUFTensornow accepts GGML NVFP4 (type 40) blocks: 64 elements per block as four K16 sub-blocks, four UE4M3 scale bytes followed by 32 bytes of E2M1 codes.dequantize_ggufdecodes them directly, andto_exportable_nvfp4_tensor()repacks them losslessly into the portable torchao NVFP4 layout (nibble reorder from GGML's eight-lows-then-eight-highs to even-element-low, GGML's sign-ignoring UE4M3 canonicalized tofloat8_e4m3fn, code 8 canonicalized to +0, required per-tensor scale from the GGUF.scalecompanion, which the caller pairs by name before any dtype cast; tensor scales other than float32 are rejected because a cast would already have rounded them). The 0xff scale byte decodes to 480 in GGML, which E4M3 cannot represent, so the conversion rejects it instead of silently changing values. Because the blocks exclude that scale, an NVFP4ExportableGGUFTensoris not a complete weight:dequantize(), linear/embedding/transpose/copy andfuse_along_outputraise and point toto_exportable_nvfp4_tensor(per_tensor_scale=...);torchao::dequantize_gguf(raw, "nvfp4")still decodes the blocks alone.ExportableNVFP4Tensorcarries an optional static activation global scale (GGUF/ModelOptinput_scale, coerced to a Python float) that only W4A4 backends read from the tensor; it never reaches the exported graph.NVFP4 follows the generic GGUF design:
_quant_typereturns its block geometry (64 elements in 36 bytes) itself, since not every gguf-py release knows GGML type 40, anditer_ggufwraps NVFP4 tensors through the generic block-quantized path. NVFP4 is not in_VALIDATED_QUANT_TYPESbecause no native engine decodes it, so the native backend now rejectsdequantize_gguftypes outside that set at export (in practice only NVFP4 gets that far) instead of failing when the program loads.Backends only need to understand
ExportableNVFP4Tensor; none of them has to parse GGML blocks.This is the first of three diffs adding NVFP4 to the CUDA backend (GGUF loading, CUDA kernels and dispatch, Muse Glimmer integration), followed by kernel follow-ups.
Authored with Claude Code.
Differential Revision: D131418678