1module Platform.RunPod.Nvidia.SM90
2
3import Model.Config
4import Model.Parameter
5import Model.Word32
6import Model.Word64
7import Platform.Linux.Nvidia.Compatibility
8import Platform.Linux.Nvidia.Memory.ABI
9import Platform.RunPod.Nvidia.SM86
10import Std.List
11import Std.Natural
12import Std.Word
13
14-- The RunPod H100 SXM (Hopper, compute 9.0): the 80 GB HBM3 part of the
15-- 8xH100 nodes nanochat's speedrun rents, taken one GPU at a time. The
16-- product record is the RunPod target record SM86 defines (identity, product
17-- name, compute capability, video memory); only its values are Hopper's.
18--
19-- Measured on RunPod pod gpt2-h100, driver 580.126.09, 2026-10-10
20-- (evidence: donto-resources research/gpt2-alpha-2026-10-06/h100/profile):
21-- name "NVIDIA H100 80GB HBM3", PCI 0x2330 sub 0x16C1, VBIOS 96.00.DA.00.0C
22-- 132 SMs, 2048 threads and 65536 registers per SM, 1024 threads per CTA
23-- 233472 B shared memory per SM, 232448 B per CTA opted in, 49152 B default
24-- 50 MiB L2, 5120-bit HBM3 at 2619 MHz, SM clock up to 1980 MHz, 700 W
25-- 85017493504 B video memory, 480 MiB of it reserved by the driver
26def runPodH100TargetIdentity : Bytes =
27 b"runpod-nvidia-h100-80gb-hbm3-sm90"
28
29def runPodH100ProductIdentity : Bytes =
30 b"NVIDIA H100 80GB HBM3"
31
32-- cuDeviceTotalMem 85017493504 = 0x13_CB70_0000 (81079 MiB free + 480 MiB
33-- reserved = nvidia-smi's 81559 MiB total)
34def runPodH100TotalVideoMemory : StdU64 =
35 0x0000_0013_CB70_0000
36
37-- 480 MiB (nvidia-smi -q -d MEMORY, "Reserved")
38def runPodH100ReservedVideoMemory : StdU64 =
39 0x0000_0000_1E00_0000
40
41def runPodH100TargetProfile : RunPodSM86TargetProfile =
42 (record
43 RunPodSM86TargetProfile
44 (runPodSM86TargetIdentityValue = runPodH100TargetIdentity)
45 (runPodSM86ProductIdentityValue = runPodH100ProductIdentity)
46 (runPodSM86ComputeMajorValue = 9)
47 (runPodSM86ComputeMinorValue = 0)
48 (runPodSM86TotalVideoMemoryValue = runPodH100TotalVideoMemory)
49 (runPodSM86ReservedVideoMemoryValue = runPodH100ReservedVideoMemory))
50
51-- Hopper command-stream facts (NVIDIA open-gpu-doc classes/compute/
52-- clcbc0.h and clcbc0qmd.h): SASS_VERSION 0x90, the class 0xCBC0 and SPA
53-- version 9.0. HOPPER_COMPUTE_A launches are described by QMD V04_00, a
54-- 384-byte record the compiler places in a 512-byte slot (SEND_PCAS_A
55-- addresses QMDs in 256-byte units).
56def runPodSM90QMDSlotBytes : Nat =
57 512
58
59def runPodSM90QMDArchitecture : ModelWord32 =
60 144
61
62def runPodSM90ComputeClass : ModelWord32 =
63 52160
64
65def runPodSM90SPAVersion : ModelWord32 =
66 2304
67
68-- ---- what the H100 supplies (Platform.Linux.Nvidia.Compatibility) ----
69-- Shared memory per block is the opt-in limit the hardware admits, which
70-- the QMD V04 encoder honours (Accelerator.SM90.SharedMemory): CUDA's
71-- 48 KiB default is its driver's policy, not the card's. Unified memory is
72-- absent: RunPod's H100 hosts were not established to open
73-- /dev/nvidia-uvm (GPT2.Build.Target runs them direct-RM).
74def runPodH100Record : Bytes =
75 b"comparisons/h100/README.md"
76
77def runPodH100Supplies : (family StdList NvidiaSupply) =
78 (let unrestricted measured =
79 (constructor NvidiaEvidence NvidiaEvidenceMeasured runPodH100Record)
80 in
81 let unrestricted architectural =
82 (lambda unrestricted source : Bytes .
83 constructor NvidiaEvidence NvidiaEvidenceArchitectural source)
84 in
85 then (nvidiaSupply b"instruction-set" 90 (architectural b"NVIDIA Hopper GH100: compute capability 9.0 (CUDA C++ Programming Guide, compute capabilities)"))
86 (nvidiaSupply
87 b"compute-class"
88 (modelWord32ToNatural runPodSM90ComputeClass)
89 (architectural b"HOPPER_COMPUTE_A (open-gpu-doc, clcbc0.h)"))
90 (nvidiaSupply
91 b"registers-per-thread"
92 255
93 (architectural
94 b"an 8-bit register operand, R255 the zero register (Accelerator.SM90.Word)"))
95 (nvidiaSupply b"threads-per-block" 1024 measured)
96 (nvidiaSupply b"shared-bytes-per-block" 232448 measured)
97 (nvidiaSupply b"driver-branch" (nvidiaCompatibilityTextWord b"580.") measured)
98 (nvidiaSupply
99 b"video-memory-bytes"
100 (modelWord64Natural runPodH100TotalVideoMemory)
101 measured)
102 nvidiaNoSupplies)The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.