warranty
warranty reads the memory-error record an NVIDIA GPU keeps about itself and
returns it in full, and is loadable through kernels. A GPU with ECC counts
corrected and uncorrected errors by location, remaps failing DRAM rows into
spare capacity, and records when a bank runs out of spares. nvidia-smi
shows only part of this. The package reads all of it through NVML, scrubs a
region of memory for a current measurement, classifies the card, and formats
the result as an RMA ticket with a digest, or as an RMA request letter
addressed to NVIDIA's chief executive.
Usage
from kernels import get_kernel
w = get_kernel("phanerozoic/warranty", version=1, trust_remote_code=True)
rep = w.report(0) # counters, remap state, 2 GiB scrub, verdict
rep["verdict"] # "healthy" ... "remap_exhausted"
print(w.claim(rep)) # ticket text, SHA-256 over the report
print(w.email(rep, sender="Your Name"))
python -m warranty.rma_email --sender "Your Name" # prints the letter
python -m warranty.rma_email --json # prints the report
It reads counters and returns text. It does not write to the device and
does not send anything. pynvml (nvidia-ml-py) is required; torch is used
for the scrub when present.
API
| Symbol | Purpose |
|---|---|
report(index=0, scrub_gib=2.0) |
identity (name, serial, UUID, VBIOS, driver, PCI, ECC mode), error counters by scope, kind and location, remapped rows and the spare-row histogram, retired pages where the part supports them, the scrub result, and the verdict |
verdict(report) |
one of healthy, degrading, remap_pending, uncorrectable, remap_exhausted, worst condition first |
claim(report) |
plain-text RMA ticket ending in a SHA-256 over the canonical JSON of the report |
email(report, sender=None, to=..., address=None) |
RMA request letter with the ticket attached |
digest(report), verify(report, sha) |
the digest and its check |
Method
Counters come from nvmlDeviceGetMemoryErrorCounter over both scopes
(volatile since the last reset, aggregate over the part's life), both kinds
(corrected, uncorrected) and every location NVML defines; zero counts are
omitted. Row remapping comes from nvmlDeviceGetRemappedRows (rows remapped
for correctable and uncorrectable causes, whether a remap awaits a reset, and
whether a remap has failed) and nvmlDeviceGetRowRemapperHistogram (banks
grouped by how many spare rows remain). Parts that retire pages instead of
remapping rows report through nvmlDeviceGetRetiredPages.
The scrub fills a region of device memory with a seeded pattern, reads it
back, and counts mismatches, over three passes with the pattern inverted
between them. The region is the smaller of scrub_gib and half of free
memory.
The verdict is ordered by severity. A remap failure or a bank with no spare
rows is remap_exhausted; any uncorrected count or scrub mismatch is
uncorrectable; a remap or page retirement waiting on reset is
remap_pending; any corrected count or correctable remap is degrading;
otherwise healthy.
The digest is SHA-256 over the report serialized with sorted keys and no
whitespace. claim and email embed it, so the text can be checked against
the report.
Correctness
tests/test_warranty.py runs a fixed sample record through every verdict
transition, checks that a scrub mismatch alone yields uncorrectable, that
the digest in claim verifies and stops verifying once a counter is edited,
that email carries the headers, salutation, counts, remap-failure text,
digest, signature and attached ticket, and, when an NVML device is present,
that report reads it and its digest verifies.
Requirements and limits
pynvml(nvidia-ml-py). Without it, every entry point raises with the install hint.- ECC counters exist only on parts with ECC enabled; consumer cards without ECC report empty counters and the verdict rests on the scrub.
- Row remapping is Ampere and later; page retirement is Volta and Turing. Each is reported when the part supports it and omitted otherwise.
- The scrub needs torch with CUDA and runs on the device with the same
index; pass
scrub_gib=0to skip it. - The letter is text. Sending it is up to you.
References
NVIDIA Management Library (NVML) API Reference, Device Queries: memory error counters, remapped rows, row remapper histogram, retired pages; NVIDIA GPU Memory Error Management (application note).
License
Apache-2.0.
- Downloads last month
- -
- Kernel Builder
- 19aaa64





