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] GPTQ Hessian-inverse CPU fallback only triggers on errors whose text contains "out of memory"; HIPSOLVER/CUSOLVER_STATUS_ALLOC_FAILED aborts the whole run #4350
Severity: low–medium. Status: one crash observed on a Radeon AI PRO R9700; the gap itself is from reading the code and could not be triggered on demand.
Where
gptqmodel/quantization/gptq.py:2430-2432 re-raises any RuntimeError unless "out of memory" in str(exc). The similar handlers at :2351 and :2387 use the same text match.
What happened
Run: Llama-3.2-1B-Instruct GPTQ, 512 samples, PYTHON_GIL=0, 2 GPUs, with other GPU work on the host.
Error:RuntimeError: hipsolver error: HIPSOLVER_STATUS_ALLOC_FAILED, when calling hipsolverDnSpotrs(...).
Effect: the message does not contain "out of memory", so the existing CPU fallback was skipped and quantization died. The identical run passed on retry.
Expected
Treat solver allocation failures (HIPSOLVER_STATUS_ALLOC_FAILED, CUSOLVER_STATUS_ALLOC_FAILED, and torch.OutOfMemoryError subclasses) like OOM, and fall back to CPU.
Found during an AI-assisted review (Claude Code, round 11) of 842d666; repros were run at that commit on RTX 4090/5090 (CUDA 13) and/or Radeon AI PRO R9700 (ROCm) unless marked static/suspected.
Round-12 follow-up at def6e61 (Radeon AI PRO R9700): def6e61 covers only the GPTQ Hessian inverse. Two other call sites still abort the run on allocation failure. Both happened in real runs on a memory-loaded GPU, but neither can be triggered on demand.
VPTQ:quantization/vptq.py:655-670. _inverse_hessian_cholesky has no allocation-failure handling.
torch.cholesky_inverse (:669) raised RuntimeError: hipsolver error: HIPSOLVER_STATUS_ALLOC_FAILED ... hipsolverDnDpotrs, and the Qwen3-0.6B VPTQ run died.
:662-667 re-raises any RuntimeError from linalg.cholesky, including OOM and allocation failures, as "Hessian is not positive definite". That message misleads the user.
GPTQ GAR:quantization/gptq.py:2810 → gar.py:174. invert_perm(final_perm) runs on the GPU outside any OOM guard.
In a 1-layer Qwen3-30B-A3B MoE run, four expert Hessian inverses had already fallen back to CPU cleanly.
Then torch.AcceleratorError: CUDA error: out of memory (hipErrorOutOfMemory) at invert_perm killed the run.
_is_memory_allocation_failure would match this error, but the call site is never wrapped.
Activity
Qubitium commentedon Nov 16, 2026
Claimed. This issue is now owned by a dedicated worker; a fix PR referencing it will follow. Please avoid duplicating work on it in the meantime.
fix(gptq): classify solver allocation failures for CPU fallback (#4350)…
Qubitium commentedon Nov 16, 2026
Round-12 follow-up at
def6e61(Radeon AI PRO R9700): def6e61 covers only the GPTQ Hessian inverse. Two other call sites still abort the run on allocation failure. Both happened in real runs on a memory-loaded GPU, but neither can be triggered on demand.quantization/vptq.py:655-670._inverse_hessian_choleskyhas no allocation-failure handling.torch.cholesky_inverse(:669) raisedRuntimeError: hipsolver error: HIPSOLVER_STATUS_ALLOC_FAILED ... hipsolverDnDpotrs, and the Qwen3-0.6B VPTQ run died.:662-667re-raises anyRuntimeErrorfromlinalg.cholesky, including OOM and allocation failures, as "Hessian is not positive definite". That message misleads the user.quantization/gptq.py:2810→gar.py:174.invert_perm(final_perm)runs on the GPU outside any OOM guard.torch.AcceleratorError: CUDA error: out of memory(hipErrorOutOfMemory) atinvert_permkilled the run._is_memory_allocation_failurewould match this error, but the call site is never wrapped.