Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrToolNotInstalled = errors.New("nvidia-smi not installed")
ErrToolNotInstalled is returned when nvidia-smi cannot be located on PATH.
Functions ¶
This section is empty.
Types ¶
type Cell ¶
Cell is a single entry of the connectivity matrix. Lanes is populated only for NVLINK links (e.g. NV12 -> Lanes 12); it is 0 for every other link type.
type LinkType ¶
type LinkType string
LinkType classifies the interconnect between two endpoints in the topology matrix produced by `nvidia-smi topo -m`.
type Matrix ¶
type Matrix struct {
GPUs []string
Cells map[string]map[string]Cell
NICs []NICAffinity
}
Matrix is the structured form of the topology matrix: the GPU-to-GPU cell grid plus per-NIC GPU affinity rows.
func Parse ¶
Parse converts raw `nvidia-smi topo -m` output into a Matrix. Columns are located by their header labels (GPU#/NIC#), not by fixed widths; the "CPU Affinity"/"NUMA Affinity" columns and any Legend block are ignored. A missing or unparseable matrix returns an error rather than a partial result.
type NICAffinity ¶
NICAffinity captures how a single NIC connects to every GPU on the host.
type Result ¶
Result bundles the parsed matrix with the derived affinity advice.