interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

branch main Branches Tags History

CUDApp / evidence / LATMEAS-GB10-20261101 / sm121_vs_NAK.md

42 lines · 4673 bytes Raw Blame History Source

GB10 (sm_121) measured latencies vs NAK

Chip: NVIDIA GB10 (DGX Spark), sm_121 Driver: NVRM version: NVIDIA UNIX Open Kernel Module for aarch64 580.173.02 Release Build (dvs-builder@U22-A24-5-4) Tue Jun 23 08:34:19 UTC 2026. No NVIDIA user-space libraries. Method: dependent-chain timing kernel. One warp (32 threads), lane 0 stores. Each fixed-latency producer is issued at a programmed stall. The GB10 column is the smallest stall S such that S and every larger S in the sweep matched the oracle on every run. Cycles are the CS2R clock delta (NAK_SV_CLOCK_LO, 0x50) around that chain, median and max-min. Source: tests/gpu_latmeas_test.c in aien-dev/CUDApp How to rerun: sh tools/latmeas/run_spark.sh OUTPUT_DIR

NAK reference: nak/sm120_instr_latencies.rs plus latencies/sm100/*.csv at Mesa commit 01bab9302a6bf0a082c7ba8c49d74427cf10b0cf

Priority 1: values CUDA++ currently borrows from NAK (needs independent measurement)

Writer -> readerNAK valueNAK source lineGB10 measuredDeltaRuns / spreadKernel
ALU -> ALU (GPR RAW)4 + 1 = 5latencies/sm100/reg_raw.csv:2 row alu column alu = 4; sm120_instr_latencies.rs:457 GPR raw adds max(adjust, 1); IAdd3 is Alu at line 444-111 runs; stall spread 0; cycles at that stall median 2538 spread 0; stall-1 cycles median 2474 spread 0; loop overhead median 1261tests/gpu_latmeas_test.c (alu_alu)
FMA -> FMA (GPR RAW)4 + 1 = 5latencies/sm100/reg_raw.csv:5 row fma column fma = 4; sm120_instr_latencies.rs:59 FFma is Fma; line 457 adds 14-111 runs; stall spread 0; cycles at that stall median 2538 spread 0; stall-1 cycles median 2474 spread 0; loop overhead median 1261tests/gpu_latmeas_test.c (fma_fma)
Mixed ALU <-> FMA (GPR RAW)5 + 1 = 6latencies/sm100/reg_raw.csv:2 row alu column fma = 5 and line 5 row fma column alu = 5; sm120_instr_latencies.rs:457 adds 15-111 runs; stall spread 0; cycles at that stall median 4362 spread 0; stall-1 cycles median 4170 spread 0; loop overhead median 1261tests/gpu_latmeas_test.c (mixed)
Predicate write -> guard13 + 1 = 14latencies/sm100/pred_raw.csv:11 row redirected_fp64 column dualalu = 13; sm120_instr_latencies.rs:474 predicate raw(write, None) uses reader RedirectedFp64 and adds 1; ISetP is Dualalu at line 4913-111 runs; stall spread 0; cycles at that stall median 2714 spread 0; stall-1 cycles median 70 spread 0; loop overhead median 1261tests/gpu_latmeas_test.c (pred)

Priority 2: instructions where CUDA++ (nvcc-derived) and NAK disagree

Instruction / pairNAK valuenvcc sm_121 stallGB10 measuredAgrees withKernel
Predicate write -> guard, attention emitter13 + 1 = 141313nvcctests/gpu_latmeas_test.c (pred)
HMMA -> non-HMMA reader (FADD of d0)19 + 9 = 2815 + NOP 14 = 2920neithertests/gpu_latmeas_test.c (hmma_reader)
IMAD.WIDE low half -> IADD33 + 1 = 46 (blanket K_FIXED; IMAD.WIDE is not in fixed_pair_class)3neithertests/gpu_latmeas_test.c (imad_wide_lo)
FMNMX (dualalu) -> IADD3 (alu)4 + 1 = 56 (blanket K_FIXED; FMNMX is not in fixed_pair_class)4neithertests/gpu_latmeas_test.c (fmnmx_alu)
QMMA (IMMA) -> next reader19 + 7 = 2615 + NOP 15 = 30not generated (patched QMMA placeholder; see REPRODUCE.md)
Fixed-producer minimum in the numeric checker5 + 1 = 6 for mixed ALU/FMA5 (any fixed producer; mixed pairs need 6)5nvcctests/gpu_latmeas_test.c (mixed)
BSSY stalldecoupled (1 & sb)1, no scoreboardnot generated (NAK class is decoupled, not a fixed GPR RAW)
BSYNC stalldecoupled (1 & sb)5, no scoreboardnot generated (NAK class is decoupled, not a fixed GPR RAW)
BRA stalldecoupled (1 & sb)5not generated (NAK class is decoupled, not a fixed GPR RAW)
EXIT stalldecoupled (1 & sb)5not generated (NAK class is decoupled, not a fixed GPR RAW)
BAR.SYNC stalldecoupled AGU (1 & sb)6not generated (NAK class is decoupled, not a fixed GPR RAW)

Notes