Documentation
¶
Overview ¶
Package gpu is the launcher's view of GPU health (go/launch spec 0001 D9). It holds no NVML: the reader lives in gpu/nvml, behind a build tag, so the default build stays free of cgo.
Index ¶
Constants ¶
const ( CounterECC = "ECC errors" CounterRemappedRows = "remapped rows" )
The counters Faults reads, as named in Device.Unsupported.
Variables ¶
ErrUnavailable is returned by a Reader that cannot reach its library or devices.
Functions ¶
Types ¶
type Device ¶
type Device struct {
UUID string
// UncorrectedECC is the volatile count of uncorrected ECC errors.
UncorrectedECC uint64
RemapPending bool
RemapFailure bool
RetiredPending bool
Throttle uint64
TemperatureC int
// Unsupported names the counters this GPU or its driver can't give, whose fields above are zero
// because they are unknown.
Unsupported []string
}
Device is one visible GPU's counters at a moment.
type Fault ¶
type Fault struct {
GPU string
Xid []int
// At is the event's time when an Xid in the fault set showed it, and zero when only the
// end-of-run counters did (D8).
At time.Time
// Reason names what showed the fault, for the document's evidence.
Reason string
}
Fault is what a run's readings say about one GPU.
type Reader ¶
type Reader interface {
// Snapshot reads every visible GPU's counters.
Snapshot(ctx context.Context) ([]Device, error)
// Watch sends Xid events until ctx ends, then closes the channel.
Watch(ctx context.Context) (<-chan Xid, error)
// Close releases the library.
Close() error
}
Reader reads a node's GPUs.