You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] #5495 (fix of #5367) incomplete: FP16 grad forward still NaN after the CPU int4pack warm-up (runtime decode has no range-safe dtype) and on the GPTQ TorchFused/TorchAten fallbacks #5577
safeNo suspicious indicators found in the reviewed text; not a guarantee of safety.scannedAutomated static security screen completed on the issue text.
#5495 (fix of #5367) made the AWQ CPU dense fallback decode in a range-safe dtype (AwqDecodeRangeMixin._decode_dtype_for_activation). That covers only the checkpoint-layout decode (awq_weight_dequantize). Two decodes with the same overflow are left:
TorchFusedAwqLinear no-grad 30720.0 grad nan
TorchAtenAwqLinear no-grad 30720.0 grad nan
Without the warm-up, the grad forward returns 30720 (what the #5495 test checks). After the warm-up, an FP32 grad activation also returns 30720; only the FP16 runtime decode overflows.
GPTQ, the same numbers (qweight=-1, zero code 0, FP16 scales 8192, asym, g32, 32x16):
Have runtime_int4pack_dense_weight() decode in the dtype _decode_dtype_for_activation() returns: FP32 when the FP16 range does not fit, then the product accumulates wide as the #5495 path does. Apply the same mixin or decode-dtype check to the GPTQ int4pack kernels' dequantize_weight fallback.
Test that should have caught it
test_cpu_awq_fallback_decodes_overflowing_fp16_scale calls the grad forward on a fresh layer only. Add a no-grad warm-up before it, and parametrize over the GPTQ int4pack kernels.
Severity
Low. It needs a decoded weight above the FP16 range, the same contrived range as #5367. But the output is NaN, and the no-grad and grad forwards of the same layer disagree.
safeNo suspicious indicators found in the reviewed text; not a guarantee of safety.scannedAutomated static security screen completed on the issue text.
Activity
Qubitium commentedon Nov 20, 2026
Agent claim:
agent-root-5577-int4pack-decode-dtypeis working on this issue now.fix(cpu): decode int4pack fallbacks in a range-safe dtype (#5577) (#5596