interplane.Get Omega
Read in your language

aien-train

AIEN training programme: language-model history, GB10 constraints and the route to training on the project engine. Plans and runnable checks are distinguished.

Brought by drakestapleton

branch main Branches Tags History

aien-train / docs / physics / gb10-training.md

382 lines · 31295 bytes Raw Blame History Rendered
1# Training on one GB10: what fits on the math cores, and how fast it can go (L279)
2
3Drake's question (2026-10-20): can this Spark train our own language model if we cut the software out of the way,
4and can the training stay on the "math cores" (the GPU's compute units and the fast storage inside them) instead of
5streaming everything through the 128 GB main memory every step?
6
7Short answer, details below:
8
9- **What fits inside the chip is small.** All the fast storage inside the GPU adds up to about 42 MiB (registers
10 12 MiB, per-core shared memory and L1 6 MiB, L2 cache 24 MiB). The part our code can actually address (registers and shared memory, not the caches) is
11 12.75 MiB today and about 16.6 MiB once our launcher allows the full shared memory. A model whose weights,
12 gradients and optimizer state all live there has about **1 to 4 million parameters**, depending on how many bytes
13 each parameter costs. That is a toy model: useful for experiments and very small specialist tasks, far from a
14 general chat model.
15- **For training, the memory pipe is not the main wall.** Unlike answering questions one word at a time (where
16 the weights are read once per word and memory speed decides everything), training processes thousands of words
17 per pass over the weights. Our measured numbers say a normal training step stops being limited by memory speed
18 once it processes about **3,300 words per step**, and normal training uses far more than that. The wall for
19 training is how busy we keep the tensor cores.
20- **How big, how long, on this one box:** at a realistic 50% of the measured 16-bit tensor rate, a 125-million
21 parameter model trained the compute-optimal way takes about **9 hours**, 350 million about **2.9 days**,
22 1 billion about **23 days**, 3 billion about **210 days**. At the speed of our best tensor kernel today (30.6
23 trillion operations per second, about a quarter of the chip's 16-bit rate) each figure is roughly twice as long.
24
25Every number below says whether it is **spec** (the maker's or a reviewer's figure, cited), **measured** (our own
26code on this GB10, with the receipt path), or **computed** (arithmetic on measured numbers, with an aien-calc
27receipt id `calc:xxxxxxxx`).
28
29Words used here:
30- **SM (streaming multiprocessor):** one of the GPU's compute units. Each has its own tensor cores (matrix-multiply
31 units), registers and shared memory.
32- **Registers:** the fastest storage, inside each SM, private to each thread.
33- **Shared memory / L1:** a 128 KB scratchpad and cache inside each SM, shared by the threads running there.
34- **L2 cache:** a 24 MB cache shared by all SMs, still on the chip.
35- **Main memory (DRAM):** the 128 GB LPDDR5x the CPU and GPU share. Off the GPU's compute dies, much slower.
36- **Parameter:** one number (weight) in the model. A "125M model" has 125 million of them.
37- **Gradient:** for each parameter, the direction and size of the change the last batch asks for.
38- **Optimizer state:** extra numbers per parameter the update rule keeps between steps (Adam keeps two).
39- **Token:** a word or piece of a word; models read and write tokens.
40
41## 1. What is on the chip, and what fits there (Q1)
42
43### 1.1 Inventory
44
45| Item | Value | Kind and source |
46|---|---|---|
47| CUDA cores (FP32 lanes) | 6,144 | measured through our path: RM `NV2080_CTRL_CMD_GR_GET_INFO` index `GPU_CORE_COUNT` = 6144, physics `evidence/m19r_gate4_forge_hwid_evidence.json` (physics@e95e3ed, code `forge/forge_descriptor.c`); spec agrees: "CUDA Cores: 6,144" [1] |
48| Max resident warps per SM | 48 (1,536 threads) | measured through our path: same receipt, `max_warps_per_sm` 48; spec agrees: "Maximum number of resident warps per SM: 48" [2] |
49| SMs per TPC | 2 | measured through our path: same receipt, `sm_per_tpc` 2 |
50| SM count | **48** | measured through our path: `evidence/physics-gb10/gr_info.txt` (tool `streams/physics-gb10/gr_info.c`, read-only RM GR_GET_INFO, 2026-10-20T18:09Z): LITTER_NUM_GPCS 4 x LITTER_NUM_TPC_PER_GPC 6 x LITTER_NUM_SM_PER_TPC 2 = 48, and GPU_CORE_COUNT 6144 = 48 x 128. The "LITTER" values are the chip layout; the enabled count is confirmed by the core count. Spec agrees: "The iGPU features 48 Streaming Multiprocessors running at up to 2.55 GHz" [3]. The driver returns 0 (not reported) for SM_REG_BANK_COUNT, so register-file size stays spec |
51| Registers per SM | 64 K x 32-bit = 256 KiB | spec: "Number of 32-bit registers per SM: 64 K" for compute capability 12.x [2] |
52| Shared memory per SM | up to 100 KB (99 KB per block) | spec [2]. **Our launcher today caps a block at 16 KiB** (omega `src/omega_blackwell_qmd.h:41`, issue #560, noted by L272), so Omega kernels cannot yet use the full 100 KB |
53| L1 + shared memory per SM | 128 KB | spec: "Unified Data Cache Size (KB): 128" [2]; "has 128 KB of L1/Shared Memory" [3] |
54| L2 cache | 24 MB | outside report, not an NVIDIA page: "GB10’s 24 MB L2" [3]; ServeTheHome reports the same, quoted in omega `docs/MACHINE_CEILING.md` (doc/machine-ceiling@3c8ce239). NVIDIA's hardware page [1] states no L2 size |
55| Main memory | 128 GB LPDDR5x, 273 GB/s | spec: "128 GB LPDDR5x unified system memory, 256-bit interface, 4266 MHz, 273 GB/s bandwidth" [1] |
56| Main memory read, GPU | **245.1 GB/s** | measured (L151): omega doc/machine-ceiling@3c8ce239, `evidence/MACHINE-CEILING-20261020/raw/gpu-tc-peak.txt`, window 20261020T030919Z-9d9d5a |
57| Main memory write, GPU | **175.1 GB/s** | measured (L151): same window, `raw/gpu-ceiling.txt`. Writes matter for training (gradients, optimizer state) |
58| L2 read, all SMs | **5,110.8 GB/s** | measured (L151): `raw/gpu-pf-mem.txt` |
59| L2 write | "just under 1 TB/s" (half rate) | spec/outside measurement [3]; not measured by us: UNKNOWN row U1 |
60| Shared memory read, all SMs | **14.38 TB/s** (16 KB blocks) | measured (L151): `raw/gpu-ceiling.txt` |
61| BF16 tensor rate (HMMA.16816.F32.BF16) | **118.81 TFLOPS** | measured (L151): `raw/gpu-tc-peak.txt`. NVIDIA publishes no dense BF16 figure |
62| FP8 tensor rate (QMMA.16832.F32.E4M3) | **237.52 TFLOPS** | measured (L151): `raw/gpu-qmma.txt`. NVIDIA publishes "up to 1 PFLOP ... at FP4 precision with sparsity" [1], no dense FP8 figure |
63| Best Omega tensor GEMM on a real shape | **30.6 TFLOPS** (FP8, 4096 x 5120 x 6144, loaded box) | measured: omega-mv `cascade/prefill-kernels` (commit 61274684), `evidence/qgemm-q38-group4-1f37f9f6-20261019T1731Z/raw.log`: "QGEMM-inplace group 4 q38o tokens 4096 M 4096 n 5120 k 6144 tiles 64: median 8.433 ms (min 8.121), 30.6 TFLOPS". A forward GEMM only; Omega has no backward GEMM yet (section 3.2). That is 0.129 of the FP8 rate (calc:fb7f5693, from MACHINE_CEILING) |
64
65These ceilings were measured by L151 (cc-machine-ceiling) in one quiet window with our own kernels. L272
66(cc-speed-onchip) is re-measuring the on-chip walls for decode in `docs/speed/GB10_CEILINGS.md` on omega
67feat/decode-onchip-megakernel; it had not pushed when this was written (checked 2026-10-20 ~18Z). This stream ran
68no bandwidth or tensor-rate benchmark of its own, by rule.
69
70### 1.2 The on-chip total
71
72| Storage | Per SM | x 48 SMs | Kind |
73|---|---|---|---|
74| Registers | 256 KiB | 12,582,912 B = 12 MiB (calc:aac73c4f) | spec per SM [2], x 48 [3] |
75| L1 + shared memory | 128 KiB | 6,291,456 B = 6 MiB (calc:9e88360f) | spec per SM [2][3] |
76| Inside the SMs | | 18,874,368 B = 18 MiB (calc:b90d90eb) | computed |
77| L2 (shared by all SMs) | | 25,165,824 B = 24 MiB | outside report [3] (taken as MiB; if the 24 MB is decimal the total drops by 1.2 MB) |
78| **Everything on the GPU die** | | **44,040,192 B = 42 MiB** (calc:8bc2b7c3) | computed |
79
80Main memory holds 128 GB. The chip holds about 1/3000 of that.
81
82This total is a physical upper bound, and two of its parts are caches: our code cannot place a number in L1 or L2
83and be sure it stays there (L2 is also shared with every other program on the box). What a kernel can address on
84purpose is registers plus shared memory:
85
86| On-chip storage a kernel can hold model numbers in | Bytes | Kind |
87|---|---|---|
88| Physical upper bound: registers + L1/shared + L2 | 44,040,192 (42 MiB, calc:8bc2b7c3) | computed from spec |
89| Addressable once the launcher allows the chip's 99 KB of shared memory per block (issue #560): registers + 48 x 99 KiB | 17,448,960 (about 16.6 MiB, calc:d1b858fa) | computed from spec [2] |
90| **Addressable today** through our launcher: registers + 48 x 16 KiB (`src/omega_blackwell_qmd.h:41`) | **13,369,344 (12.75 MiB, calc:5c1c408c)** | computed |
91
92A real kernel also needs registers for its own working values, so even the addressable figure is an upper bound;
93the Q3 probe uses 32 of its 68 registers per thread for weights (section 3).
94
95### 1.3 The largest model that fits
96
97Bytes per parameter for each training scheme:
98
99| Scheme | What is kept per parameter | Bytes |
100|---|---|---|
101| A. Standard mixed precision with Adam | BF16 weight 2 + BF16 gradient 2 + FP32 master weight 4 + FP32 Adam first moment 4 + FP32 second moment 4 | 16 |
102| B. BF16 with 8-bit optimizer state | BF16 weight 2 + BF16 gradient 2 + two 8-bit Adam moments 2. Assumption of this document: no FP32 master copy (common 8-bit optimizer setups keep one, which makes it 10 B) | 6 |
103| C. Muon-style (momentum only, no second moment) | BF16 weight 2 + BF16 gradient 2 + BF16 momentum 2. Assumption of this document: applied to every parameter (in practice Muon covers the matrix weights and the rest stays on Adam) | 6 |
104| D. FP8 throughout | FP8 weight 1 + FP8 gradient 1 + two 8-bit moments 2 | 4 |
105| Weights only, BF16 | gradients and state streamed from main memory | 2 |
106| Weights only, FP8 | same | 1 |
107
108| Scheme | Physical bound, 42 MiB (incl. L1 and L2 caches) | Inside the SMs, 18 MiB (regs + all of L1/shared) | Addressable after #560, 16.6 MiB | **Addressable today, 12.75 MiB** |
109|---|---|---|---|---|
110| A (16 B) | 2,752,512 (calc:c630f624) | 1,179,648 (calc:c856b8ed) | 1,090,560 (calc:a9fca458) | **835,584** (calc:6140ea8a) |
111| B or C (6 B) | 7,340,032 (calc:f4ec138e) | 3,145,728 (calc:a62edc13) | 2,908,160 (calc:0de0a5e2) | **2,228,224** (calc:8f899b5a) |
112| D (4 B) | 11,010,048 (calc:9108596c) | 4,718,592 (calc:93fb98bb) | 4,362,240 (calc:ccfe1950) | **3,342,336** (calc:6d3d8afa) |
113| Weights only, BF16 | 22,020,096 (calc:45c96809) | 9,437,184 (calc:45b867e6) | 8,724,480 (calc:99d76e23) | **6,684,672** (calc:f0dfa1da) |
114| Weights only, FP8 | 44,040,192 | 18,874,368 | 17,448,960 | **13,369,344** |
115
116None of these leave room for the activations (the intermediate values each layer computes in the forward pass and
117the backward pass needs again). Worked example with the addressable-after-#560 figure: a 4-layer model of width 96
118has 12 x 4 x 96² = 442,368 parameters (calc:da55f631), 7,077,888 bytes at scheme A. Stored activations are 34 x 96
119bytes per token per layer [6], 13,056 bytes per token for 4 layers, so the rest of the 17,448,960 bytes holds
120**794 tokens** of activations at a time (calc:68a451c1). That is the largest micro-batch, and it makes every matrix
121multiply 794 x 96 x 96: small. How much of the tensor rate such small multiplies reach is not measured (UNKNOWN U3).
122
123**The honest size of a "math cores only" model on this chip is about 1 to 4 million parameters** with full
124training state in storage our code can address (0.8 to 3.3 million today, 1.1 to 4.4 million after #560), and up
125to about 7 to 13 million if only the weights stay on chip and the gradients and optimizer state stream through main
126memory. Counting the caches as if they were storage stretches that to 11 million (full state) and 44 million
127(FP8 weights only), but nothing guarantees a number stays in a cache.
128
129What a model that small is good for: narrow tasks with a small vocabulary of behaviour (a classifier, a router that
130picks which bigger model to call, a draft model that guesses the next few words for a big model to check, a
131controller for one device), research on training methods where many quick runs matter more than quality, and
132teaching. It will not hold general knowledge or carry a conversation. The L278 efficiency stream covers the
133literature on tiny models; it had not pushed when this was written (origin/study/efficiency was at the skeleton
134commit ed8b6ea, checked 2026-10-20 ~18Z).
135
136### 1.4 Open items for Q1
137
138- U0 (closed): SM count read through our own RM query, 48 (`evidence/physics-gb10/gr_info.txt`). Register-file size per SM
139 is not reported by the driver (index returns 0); it stays spec [2].
140- U1: L2 write bandwidth on our own path (only an outside figure exists [3]). Owned by L272's ceilings work, not
141 this stream.
142
143## 2. The training roofline on this chip (Q2)
144
145### 2.1 The ridge point
146
147The **ridge point** is the number of arithmetic operations a kernel must do per byte it moves to or from main memory
148before the math, not the memory, sets its speed. Below it the tensor cores wait for data; above it they are the
149limit.
150
151| | Rate | Ridge (FLOPs per byte read) |
152|---|---|---|
153| BF16 tensor | 118.81 TFLOPS measured | **484.7** (calc:ac4723cb) |
154| FP8 tensor | 237.52 TFLOPS measured | **969.1** (calc:05ef5299) |
155
156Both against the measured 245.1 GB/s read rate. Writes are slower (175.1 GB/s measured), which the step model below
157accounts for separately.
158
159### 2.2 Work and bytes in one training step
160
161Work: the standard count is **6 x N operations per token** for a model with N parameters: 2N for the forward pass
162(one multiply and one add per weight) and about twice that for the backward pass. Kaplan et al.: "Accounting for
163the backwards pass (approximately twice the compute as the forwards pass), we then define the estimated
164non-embedding compute as C≈6N floating point operators per training token." [4] So a step that processes B tokens
165does 6NB operations. This leaves out attention's own work, which grows with context length; at short contexts it is
166small next to 6N.
167
168Bytes, scheme A (16 B per parameter), three designs:
169
170**(a) The normal way.** Each step: forward reads the BF16 weights (2N), backward reads them again (2N) and writes
171BF16 gradients (2N), the optimizer reads the FP32 master weights, both moments and the gradient (14N) and writes the
172master weights, both moments and the new BF16 weights (14N). That is 18N bytes read and 16N bytes written per step,
173whatever B is. Time on memory: N x (18 / 245.1 GB/s + 16 / 175.1 GB/s). This treats reads and writes as taking turns, which is a
174bound; the chip can overlap some of them. Time on math: 6NB / 118.81 TFLOPS.
175The weight-and-state traffic stops being the limit when
176
177 **B ≥ 3,264 tokens per step** (calc:1bcfc00a; N cancels out).
178
179Large training runs carry far more than that per step (Chinchilla 70B used "1.5M → 3M" tokens per batch [5]), so
180in design (a) the weight and optimizer traffic is already a small share of the step. The bytes that grow with B are
181the **activations**: Korthikanti et al. count the stored activations of one transformer layer as "sbh(34 + 5as/h)"
182bytes (s sequence length, b batch, h hidden width, a attention heads) [6]. With attention done the fused way
183(scores never written to memory) the per-token, per-layer figure is 34h bytes, written in the forward pass and read
184back in the backward pass. With N ≈ 12 L h² for L layers, work per token is 72 L h²; memory time per token is
18534 L h (1/245.1 GB/s + 1/175.1 GB/s). Activations stop being the limit when
186
187 **hidden width h ≥ 549** (calc:743f74c8).
188
189For scale, a 12-layer model of exactly that width has 12 x 12 x 549² = 43,401,744 parameters (calc:8becebee); the
190wider models in the table in 2.4 sit above the threshold. So, at the counted byte level, **a dense transformer
191training step on the GB10 is compute-bound, not memory-bound**, for every model size in the table in 2.4. The
192caveat is that 34h bytes counts only what is stored for the backward pass; a chain of separate kernels (matrix
193multiply, then normalise, then activation function, then add) also writes and rereads every intermediate in
194between. How many times over that multiplies the 34h figure in our own kernels is not measured: UNKNOWN row U2.
195Every factor k of extra traffic raises the width threshold to 549k.
196
197**(b) Layer-resident.** A persistent kernel (one that stays running on the GPU instead of being launched again per
198operation) holds one layer's weights on chip for the whole micro-batch, so weights are read once per step per
199layer and the gradient for that layer is accumulated on chip; only activations stream. Bytes per step become 32N (the second
200weight read of (a) is gone: forward and backward use the copy already on chip) plus the activation traffic. The
201crossover batch is the same as (a), because (a) already reads weights only once per step; residency helps when
202a step is split into micro-batches that would otherwise reread weights and re-add gradients each time. The limit is
203the layer size: a whole layer (12h² parameters) fits in 42 MiB as BF16 weights only up to **h = 1,354**
204(calc:2b49881b), and with its full scheme A state up to **h = 478** (calc:13ecaa54). The real gain of (b) is fusion:
205keeping the intermediates between the matrix multiplies on chip removes the unmeasured factor k above.
206
207**(c) Fully on chip.** Weights, gradients and optimizer state never leave the chip; only the token batch streams in
208(4 bytes per token id). Work per byte is 6N / 4 = 1.5N, which passes the BF16 ridge for any model above
209**323 parameters** (calc:000271d5). It is always compute-bound. Its limit is size: 2,752,512 parameters at scheme A
210(section 1.3). At the measured BF16 rate that model would process up to **7.19 million tokens per second**
211(calc:5513f69c) at 100% tensor use. That figure is not reachable: the full 42 MiB is taken by the state, leaving no
212room for activations, and the small matrices of a model this size are unlikely to keep the tensor cores busy (see
213the worked example in 1.3 and U3).
214
215### 2.3 Time per token and tokens per second
216
217Because designs (a) and (b) are compute-bound for real model widths, their speed is set by the tensor rate and how
218much of it the kernels use (called **utilization**: delivered operations divided by the chip's peak). Time per token
219= 6N / (utilization x rate).
220
221| Model | Design | Tokens per second at 100% BF16 | at 50% BF16 |
222|---|---|---|---|
223| 2.75M, scheme A | (c) fully on chip | 7,194,000 (calc:5513f69c) | about 3.6 million |
224| 125M | (a) or (b) | 158,410 (calc:234a6d6e) | 79,207 (calc:4856abbc) |
225
226Utilization assumptions, stated: **today** = our best measured tensor GEMM, 30.6 TFLOPS (FP8, real shape, loaded
227box; section 1.1); **target BF16** = 50% of the measured 118.81 TFLOPS, about the level large training runs report
228(PaLM: "very high efficiency of 46.2% in model FLOPs utilization (observed throughput relative to theoretical max
229throughput)" [7]); **target FP8** = 50% of the measured 237.52 TFLOPS, which assumes FP8 training works at our
230quality bar (not shown here).
231
232### 2.4 Days to train compute-optimal models on one GB10
233
234**Compute-optimal** (the "Chinchilla" rule): for a given compute budget, model size and training tokens should grow
235together, "for compute-optimal training, the model size and the number of training tokens should be scaled
236equally" [5]. Their Table 3 gives 20.2 billion tokens for a 1 billion parameter model [5], about 20 tokens per
237parameter. With D = 20N tokens, total work = 6N x 20N = 120N² operations.
238
239| Model | Tokens (20N) | Total work | Tokens per second, BF16 at 50% | Days, today (30.6 TFLOPS) | Days, BF16 at 50% (59.4 TFLOPS) | Days, FP8 at 50% (118.8 TFLOPS) |
240|---|---|---|---|---|---|---|
241| 50M | 1 billion | 3.0e17 | 198,000 (calc:da5b68c9) | 0.11 (calc:e8e694cf) | 0.058 (calc:b21dcb17) | 0.029 (calc:246c83a8) |
242| 125M | 2.5 billion | 1.9e18 | 79,207 (calc:4856abbc) | 0.71 (calc:6a08b864) | 0.37 (calc:fa2eb778) | 0.18 (calc:5ed28589) |
243| 350M | 7 billion | 1.5e19 | 28,290 (calc:c7f54c42) | 5.6 (calc:32211650) | 2.9 (calc:a6986476) | 1.4 (calc:837a2552) |
244| 1B | 20 billion | 1.2e20 | 9,901 (calc:3643de66) | 45 (calc:96fd4990) | 23 (calc:d76d8642) | 12 (calc:53791ae6) |
245| 3B | 60 billion | 1.1e21 | 3,300 (calc:6d9c881f) | 409 (calc:31e78732) | 210 (calc:d9255171) | 105 (calc:b9679e62) |
246
247Read it as: **this one Spark can train a compute-optimal model of a few hundred million parameters in days, a
2481 billion parameter model in two to six weeks, and a 3 billion parameter model only in months.** These are
249compute-bound numbers; they assume the data pipeline and memory keep up (2.2 says the memory does at the counted
250level), and they leave out attention's context-length work, evaluation and restarts.
251
252Memory capacity is not the limit at these sizes: scheme A at 3B is 48 GB of weights and state, within the 128 GB,
253but not alongside today's 27B model server, which holds most of the unified memory. A training run needs the box,
254or most of it.
255
256### 2.5 What Q2 means for Drake's idea
257
258For decoding (answering one word at a time), every word reads all the weights from memory, so memory speed is the
259wall and keeping things on chip is the whole game; L272 owns that. For training, the same weights serve thousands
260of tokens per step, so the counted memory traffic is already below the tensor wall on this chip. The speed of
261training on the Spark is decided by **how much of the tensor rate our kernels deliver** (today 0.13 of FP8 peak on
262a real shape) and by the **extra traffic between unfused kernels** (U2). That is where "get the bloat out of the
263way" pays for training: fused, persistent kernels that keep each layer's intermediates on chip and keep the tensor
264cores fed.
265
266## 3. The on-chip training experiment (Q3)
267
268**Built and run in this stream.** The smallest honest test of "a training step can stay on the math cores" that
269Omega can express today, built from parts already in Omega (the Blackwell instruction encoder, the register
270allocator, the emitter helpers in `src/omega_bw_em.h`, the driver-free launcher and session, the warp simulator):
271
272- Code: omega-mv branch `train/onchip-probe` at 4c8b69b2, files `src/omega_blackwell_codegen_train.c` and `.h`
273 (the kernel generator) and `tests/gpu_train_probe_test.c` (simulator check and chip run), Makefile target
274 `build/gpu_train_probe_test`. Base: omega main a8ffd2b9, physics 6d7cf0d4 (= `physics.lock`).
275- Model: one linear layer, y = W x, 32 inputs per output, FP32, no bias. Each GPU thread owns one output row (32
276 weights) and keeps it **in its registers** for the whole run. 48 thread blocks (one per SM) of as many threads as
277 the register file allows. Rows are independent, so no thread needs another thread's weights.
278- Training: plain SGD on squared error, one sample per step (the textbook "LMS" rule). Per step each thread does the
279 forward pass (y = 32 multiply-adds), the backward pass (error e = y - target; gradient of each weight = e x input),
280 and the update (each weight += -lr x e x input, 32 multiply-adds), and adds e² to its running loss. Learning rate
281 0.02. Data: 64 samples with inputs in [-1, 1] and targets made by a hidden random "teacher" layer, cycled.
282- What a step reads: the sample's 32 inputs (128 bytes, the same for every thread) and each row's target
283 (4 bytes per row). Nothing else. The weights, the gradient and the "optimizer state" (none for plain SGD) never
284 leave the registers. The loss is written once per row at the end.
285- The comparison, same model, same steps, same instruction sequence:
286 - **resident**: weights loaded from memory once before step 1, stored once after the last step;
287 - **streamed_cached**: weights loaded at the top of every step and stored at the bottom, from a GPU-cached buffer
288 (the 24 MB L2 cache can hold them);
289 - **streamed_dram**: the same, from a GPU-uncached buffer, so every load and store of the weights goes to the
290 128 GB main memory ("gpu uncached for system memory", NVIDIA driver header `nvos.h` lines 1114-1116, recorded
291 with `docs-read`).
292- Checks: the final weights and losses must be **bit-identical** across the three modes for every row (same
293 arithmetic, only the storage differs), bit-identical to a host `fmaf()` reference for every 97th row, and the
294 training loss on the data set must fall by at least 100x (computed on the host from the downloaded weights).
295- Simulator (no GPU): resident and streamed both 0 wrong of 4,224 checked values against the host reference, 68
296 registers per thread (`build/gpu_train_probe_test --host-only`, 2026-10-20).
297
298What this probe is and is not:
299- It **is** a complete forward, backward and update loop running for thousands of steps with all model state on
300 chip, through our own launch path, and a like-for-like measurement of what streaming the weights through memory
301 costs.
302- It **is not** a transformer. One linear layer has no hidden activations to keep for the backward pass, no
303 attention, no cross-SM traffic, and uses the plain FP32 multiply-add units, not the tensor cores. It answers the
304 residency question (can state stay on chip across steps, and what does it save), not the throughput question
305 for a real model; section 2 answers that from measured rates.
306- With one sample per step it is the most memory-hungry way to train (every weight is used for only 4 operations
307 per load and store), so the gap between resident and streamed here is the largest gap residency can ever buy.
308 Section 2.2 shows that with thousands of tokens per step the streamed weight traffic of a normal design drops
309 below the tensor wall anyway.
310
311### 3.1 Result
312
313Q3_RESULT
314
315### 3.2 The next experiment: a tensor-core, multi-layer version (not built here)
316
317The probe above uses FP32 multiply-adds. A probe that answers the transformer question needs these pieces; what
318Omega has and what it lacks (omega main a8ffd2b9):
319
320| Piece | Exists | Missing |
321|---|---|---|
322| BF16 tensor multiply (HMMA.16816.F32.BF16) | `BW_IR_HMMA_BF16`, `hmma()` in `src/omega_bw_em.h`, measured 118.81 TFLOPS (`src/omega_blackwell_codegen_tc.c`) | |
323| FP8 tensor multiply (QMMA) | `src/omega_blackwell_codegen_qmma.c`, measured 237.52 TFLOPS | |
324| Shared-memory tiles | `BW_IR_LDS128`, `BW_IR_STS32`, `BW_IR_BAR_SYNC` | QMD caps a block at 16 KiB of shared memory (`src/omega_blackwell_qmd.h:41`, issue #560); the chip allows 99 KB. A layer-resident kernel needs the full 99 KB |
325| Grid-wide barrier between layers (all SMs finish layer k before k+1) | atomics `BW_IR_ATOMG_ADD_STRONG_SYS`, `BW_IR_MEMBAR_ALL_SYS`, strong loads; L272 is building and costing a persistent grid barrier (`gridbar` probe, worktree omega-decode-onchip-megakernel, uncommitted at 18Z) | a proven barrier primitive on main |
326| Backward GEMMs (dX = dY Wᵀ, dW = Xᵀ dY) | forward GEMM generators (`src/omega_blackwell_codegen_gemm.c`, `_tc2.c`) | transposed-operand fragment loads for the two backward products |
327| Reverse-mode gradients, CPU reference | `src/autodiff/omega_autodiff.c` (M21, CPU tier) | GPU tier |
328| Optimizer step on chip | SGD substrate `src/train/tg_sgd.c` (M22, host, FP32) | an on-chip Adam or Muon update fused into the backward kernel |
329
330Experiment spec: a persistent kernel, one block per SM, each SM owning a slice of a 2-layer MLP (BF16 weights, FP32
331accumulate) of about 1 million parameters in shared memory and registers; forward layer 1, grid barrier, forward
332layer 2, loss, backward layer 2 (dW2 and dX2), grid barrier, backward layer 1, fused SGD-with-momentum update, next
333batch; versus the same layers as separate launches reading weights from memory. Measure step time, tokens per
334second, fraction of the 118.81 TFLOPS BF16 rate, and bytes moved per step. Filed as ledger L286.
335
336## 4. Verdict (Q4)
337
338(In progress.)
339
340## UNKNOWN rows
341
342| Id | What is not known | Experiment that resolves it | Owner |
343|---|---|---|---|
344| U0 | closed: SM count 48 measured through our RM path; register-file size not reported by the driver (stays spec) | `evidence/physics-gb10/gr_info.txt` | L279 |
345| U1 | L2 write bandwidth on our path | L2 write stream probe | L272 ceilings |
346| U2 | Extra main-memory traffic per token from unfused kernels in a real Omega training step (factor k over the 34h stored-activation count) | count bytes per kernel in one Omega forward+backward layer, then measure | first training-side kernel (section 4) |
347| U3 | Fraction of the tensor rate reached by the small matrix multiplies a fully on-chip model would run (for example 794 x 96 x 96, section 1.3) | small-shape sweep of the BF16 GEMM generator | L286 / L288 |
348
349## Sources
350
351[1] https://docs.nvidia.com/dgx/dgx-spark/hardware.html , NVIDIA DGX Spark User Guide, Hardware Overview, accessed
3522026-10-20. "128 GB LPDDR5x unified system memory, 256-bit interface, 4266 MHz, 273 GB/s bandwidth"; "CUDA Cores:
3536,144"; "up to 1 PFLOP (petaFLOP) at FP4 precision with sparsity".
354
355[2] https://docs.nvidia.com/cuda/cuda-programming-guide/05-appendices/compute-capabilities.html , CUDA Programming
356Guide, Compute Capabilities, accessed 2026-10-20. Compute capability 12.x column: "Number of 32-bit registers per
357SM: 64 K"; "Maximum amount of shared memory per SM: 100 KB"; "Maximum amount of shared memory per thread block:
35899 KB"; "Unified Data Cache Size (KB): 128"; "Maximum number of resident warps per SM: 48".
359
360[3] https://chipsandcheese.com/p/analyzing-nvidia-gb10s-gpu , Chips and Cheese, "Analyzing Nvidia GB10's GPU",
361accessed 2026-10-20. "The iGPU features 48 Streaming Multiprocessors running at up to 2.55 GHz"; "GB10 behaves much
362like Nvidia's consumer Blackwell architecture and has 128 KB of L1/Shared Memory"; "GB10's 24 MB L2 is likely
363almost as effective"; "GB10's L2 handles writes at half rate, and provides just under 1 TB/s of write bandwidth."
364
365[4] https://arxiv.org/html/2001.08361 , Kaplan et al., "Scaling Laws for Neural Language Models", 2020, accessed
3662026-10-20. "Accounting for the backwards pass (approximately twice the compute as the forwards pass), we then
367define the estimated non-embedding compute as C≈6N floating point operators per training token."
368
369[5] https://arxiv.org/pdf/2203.15556v1 , Hoffmann et al., "Training Compute-Optimal Large Language Models", 2022,
370accessed 2026-10-20. "we find that for compute-optimal training, the model size and the number of training tokens
371should be scaled equally"; Table 3: "1 Billion ... 1.21e+20 ... 20.2 Billion"; Table 4, Chinchilla 70B batch size: "1.5M → 3M" with caption "the training batch size (# tokens)"; "We verify this by training a more
372compute-optimal 70B model, called Chinchilla, on 1.4 trillion tokens."
373
374[6] https://arxiv.org/pdf/2205.05198 , Korthikanti et al., "Reducing Activation Recomputation in Large Transformer
375Models", 2022, accessed 2026-10-20. "Summing the memory required for attention, MLP, and the layer-norms, the memory
376required to store the activations for a single layer of a transformer network is: Activations memory per layer =
377sbh(34 + 5as/h)".
378
379[7] https://arxiv.org/pdf/2204.02311 , Chowdhery et al., "PaLM: Scaling Language Modeling with Pathways", 2022,
380accessed 2026-10-20. "we describe how we were able to scale pipeline-free training of PaLM 540B to 6144 chips across
381two TPU v4 Pods while achieving very high efficiency of 46.2% in model FLOPs utilization (observed throughput
382relative to theoretical max throughput) and 57.8% in hardware FLOPs utilization."