hardware_id_from_gpu_name

Function hardware_id_from_gpu_name 

Source
pub fn hardware_id_from_gpu_name(name: &str) -> Option<&'static str>
Expand description

2026-09-26: Map a GPU’s reported name onto the box class its numbers belong to: the first whole alphanumeric token, lowercased, that SKU_TOKENS lists.

The name is free text with SKU detail: "NVIDIA H100 80GB HBM3", "NVIDIA H100 PCIe", "NVIDIA H200 NVL". The fallback normalisation alone would key those as h10080gbhbm3, h100pcie and h200nvl, three keys no baseline uses.

None means “no opinion”, not “unknown box”: the caller keeps its own normalisation. GB300 and the A100 capacities are deliberately absent, so they keep separate fallback keys rather than sharing a family id.

One SKU family, one id: H100 PCIe and H100 SXM share h100. The exact name stays verbatim in Hardware::gpu; only the baseline key is coarse.