Workaround for single-bit VRAM errors — quarantine the bad cell instead of chasing the chip #91
Replies: 1 comment 2 replies
|
Very interesting. Some notes: as far as I know cuda on windows has the ability to move allocated data in the physical memory, in partucally for temporal swapping VRAM->System RAM if several apps allocates many VRAM. This seems not yet be implemented in Linux CUDA, but it may become a problem in the future. However, given CUDA may have some low-level-API this may be solveable. This is a "Pro" for using cuda. The "Con" for using cuda is "deploy nightmare". Recompiling depending on used GPU would require a cuda sdk installed, not only cuda runtime. Maybe this may be made better by compiling against 12.9 sdk (Maxwell-blackwell) with all arches in a single binary. For such app performance is not so important, so builtining coppute_XX arches containg PTX code maybe worth it too for wider compatibility.
The "practical physics" tells us that GPU thermal stabilization after putting it under a load came after 2-5 minutes depending on heatsink organization. Since many kinds of errors are tempearture dependent - the 5-minutes default duration of memtet_vualkn is the not the random number, but a time ensuring thermal stabilization of any GPU. |
Uh oh!
There was an error while loading. Please reload this page.
If memtest_vulkan shows repeated single-bit errors at the same address suffix, that's one defective cell in one VRAM IC — see #43, #65 and #89. The usual conclusion is that it's tolerable for gaming but shouldn't be trusted for ML or rendering, because the failing chip can't be identified and consumer cards have no page retirement.
I hit this on a 3090 FE and ended up sidestepping the identification problem entirely:
https://github.com/JoshBolding/gpu-vram-quarantine
It allocates the whole card in small chunks, runs a walking-bit sweep to find which chunks hold bad cells, frees the clean ones and holds the rest for the life of the process. VRAM is a shared physical resource, so once those pages are held nothing else can be given them — no cooperation needed from whatever you actually want to run. It locates the faults on every run rather than hardcoding an address, because the offset a cell appears at moves with allocator placement.
On my card it holds 8 MiB and leaves 98.9% of a healthy card's usable VRAM, against 84.9% if you just cap allocation below the fault. Verified afterwards with 342 TiB at 64 °C — the temperature where it otherwise fails constantly — with zero errors.
Two things I learned that might help anyone testing: the fault produced nothing for the first ~143 seconds of every run, so short or cold tests pass a broken card. And coverage matters — mine sat above 20 GiB, so anything smaller never touched it.
Linux and CUDA only, validated on one card, and it's a workaround rather than a repair. Caveats are in the README. Interested to hear from anyone who tries it on different hardware.
All reactions