Repository navigation
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/25433
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 1 Cancelled Job, 3 PendingAs of commit f6cc00c with merge base 9f49fe2 ( NEW FAILURE - The following job has failed:
CANCELLED JOB - The following job was cancelled. Please retry:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
|
@claude /pr-review |
|
Claude finished @Gasoonjia's task in 21m 51s —— View job Request Changes: on every GPU older than SM120 the new default sends NVFP4 linears with M > 4 (and any dynamic M) through whole-weight dequant + matmul instead of the M > 64 cutoff the code and description cite, Detailed reviewPR Review: #25433SummaryThe PR adds a whole-weight
There is no GPU in this environment, so nothing was run. Every finding comes from reading the code. Performance
API Design
Testing
Code Quality
RecommendationRequest Changes The default change affects every GPU older than SM120, and it starts at M > 4 rather than the M > 64 that the code and PR description cite. Without benchmarks at small and dynamic M, this looks like a slowdown for decode and short prefill. Before approval:
|
|
Thanks.
|
|
@claude /pr-review |
|
Claude finished @Gasoonjia's task in 20m 33s —— View job Approve: nothing blocks, and four minor points remain: Detailed reviewPR Review: #25433SummaryWithout native FP4 (below SM120, and on ROCm), NVFP4 linears whose M is not statically ≤ 64 now default to a whole-weight The reviewers found no correctness bug in the kernel or the dispatch. Four minor issues remain:
There is no GPU here, so nothing was run. Every finding comes from reading the code. Code Quality
Testing
API Design
Performance
RecommendationApprove Nothing blocks. Three of the four findings are fixes to docs, comments or test markers that don't change any compiled program. The SM120
|
[ghstack-poisoned]
[ghstack-poisoned]
|
CI update: the A10G Authored with Claude Code. |
|
@claude /pr-review |
|
Claude finished @Gasoonjia's task in 25m 7s —— View job Approve: nothing blocks; one new question is whether the A100/H100 numbers behind the Detailed reviewPR Review: #25433SummaryOn GPUs without native FP4 (below SM120, and ROCm), NVFP4 linears whose M is not statically ≤ 64 now default to whole-weight Performance
RecommendationApprove Nothing blocks. The question above only bears on how well the measurements support the
|
[ghstack-poisoned]
|
Follow-up: the exhaustive switch is now the directory's existing Authored with Claude Code. |
Stack from ghstack (oldest at bottom):
Adds
triton::nvfp4_dequant, a whole-weight NVFP4 to BF16/FP16 dequant whose values are bit-identical to the weights the fused W4A16 kernel builds in registers, and a_dequant_linearprefill path throughchunked_dequant_linear(the same dequant-then-Inductor-matmul path the integer GGUF formats take for M > 64, chunked along N for huge weights).ET_CUDA_NVFP4_PREFILL_IMPL=auto|kernel|dequantselects the prefill implementation.auto(default) keeps the fused W4A4/W4A16 kernels where FP4 tensor cores exist (SM120+); elsewhere it uses dequant + matmul only for M not statically <= 64 (like the GGUF formats), where it is faster than in-register dequant, and keeps the fused kernels, which read the packed weight once, for smaller or bounded M.kernel/dequantforce one for M not statically <= 4;w4a4and the FP32 prefill output policy always take the fused kernels._linearand the gated linear share one_dequant_prefillpredicate and validateET_CUDA_NVFP4_PREFILL_IMPLup front; the crossover is the NVFP4-ownedNVFP4_FUSED_PREFILL_MAX_ROWS(inclusive: a static M of 64 stays fused). The choice is made once per exported program from M's upper bound, andautoassumes (and the dispatch docstring states) that a dynamic-M method is exported with its largest M as the example, as the Muse Glimmer and Gemma 4 prefill methods are (the DFlash packed draft is traced with 2 context rows, so its dynamic linears dequantize without that measurement). Dynamic-M prefill methods (Muse Glimmer's default in-graph prefill is dynamic from 5 tokens, as are the DFlash and Gemma 4 31B prefills) therefore dequantize for short prompts too, which is also faster there: such a method tunes the fused kernel at its example M, and on A100 that large-M tile loses to dequant + cuBLAS at small M too (on H100 short prompts pay about 13% per layer for a 1.5-2x long-prompt gain; numbers below). The variable applies to every method traced in the process;kernelkeeps the fused kernels for all of them, and the Muse Glimmer README says so. The dequant op takes a requiredoutput_dtypelike its sibling ops, documents the finite-scale precondition, uses the exact software decode on every GPU and validates its operands.Authored with Claude Code.
Differential Revision: D131418686
NOTE FOR REVIEWERS: This PR has internal Meta-specific changes or comments, please review them on Phabricator!