omega-blas
aien-dev/omega-blas
Brought by drakestapleton
omega-blas / receipts / cublas-gb10-20261114.md
| 1 | # cuBLAS sgemm/hgemm reference on the GB10 (2026-11-14) |
| 2 | |
| 3 | This receipt only adds files. It records the vendor library's timing on spark-b87b's GB10, the |
| 4 | reference the Omega GEMM path has to beat. It is not an omega-blas measurement. omega-blas |
| 5 | large-shape throughput stays NOT_RUN; its small-shape latency is in `netlib-gb10-20261027.md`. |
| 6 | Linear: DRA-573. Related: DRA-472, DRA-485. |
| 7 | |
| 8 | ## Where it came from |
| 9 | - Host spark-b87b, GPU NVIDIA GB10, driver 580.173.02, CUDA 13.0, nvcc 13.0.88, CPU governor |
| 10 | `performance` on all 20 cores. Source: `cublas-gb10-20261114/env-summary.txt`, taken at 21:06:08. |
| 11 | The chip target `sm_121` is from `cudapp/doctor.log` (line 9) in the evidence folder. |
| 12 | - Session window: 2026-11-14 20:54–21:11 America/Chicago, as `RESULTS.md` records it. |
| 13 | `00-session-start.txt` reads 20:56:22. :18091 was stopped for the session. Every |
| 14 | time below is a file modification time in the evidence folder unless a line says otherwise. git |
| 15 | does not keep mtimes, so these can be checked only there. |
| 16 | - The stop finished at 21:05:58 (mtime of `01-18091-stop.log`). At that time |
| 17 | `compute-apps-after-stop.csv` shows no compute process. |
| 18 | - The restart started at 21:09:06 (first line of `01-18091-restart.log`). :18091 held GPU memory |
| 19 | again by 21:11:27 (`01-nvidia-smi-after-restart.txt`). |
| 20 | - Other chip tests ran in between: `cudapp/hello-gpu-*`, the last at 21:08:02 |
| 21 | (`hello-gpu-racecheck.*`). |
| 22 | - The sweep files are dated 21:08:39 to 21:08:53. That is after those tests and before the |
| 23 | :18091 restart. |
| 24 | - `clocks-before.txt` read 0 % utilisation at 21:08:40. |
| 25 | - No file records other processes during the sweep itself. |
| 26 | - Original evidence folder: `~/canon/evidence/SPARK-GPU-20261114/` on spark-b87b (`RESULTS.md`, |
| 27 | `cublas/`, `env/`, `01-*`). That folder is not under version control. The files below are |
| 28 | byte-identical copies: |
| 29 | - `env/summary.txt` was renamed `env-summary.txt`. |
| 30 | - `01-compute-apps-after-stop.csv` was renamed `compute-apps-after-stop.csv`. |
| 31 | - `cublas_sweep.cu` is kept exactly as it ran. It gets `strcmp` only through transitive includes |
| 32 | (no `<cstring>`). Do not edit it, or its hash breaks. |
| 33 | - Build and run, as `RESULTS.md` records them: |
| 34 | `nvcc -O3 -std=c++17 -arch=sm_121 -o cublas_sweep cublas_sweep.cu -lcublas`, then |
| 35 | `./cublas_sweep`. nvcc printed nothing (`compile.log` is empty). The binary is not committed. |
| 36 | - Its hash was not recorded at run time. |
| 37 | - The binary still in the evidence folder (mtime 21:08:40) hashes to |
| 38 | `391853dceb9a38e7e74d9f4403d85ee87b27fae456d360f9b1285860522520a0`. |
| 39 | - Math mode: no `cublasSetMathMode` call, so Sgemm ran under cuBLAS's default fp32 math (no TF32 |
| 40 | requested). `NVIDIA_TF32_OVERRIDE` and other cuBLAS environment variables were not recorded. |
| 41 | omega-blas's GB10 f32 path is bf16x3 (see README Numerics), so the two differ in precision mode. |
| 42 | - Hgemm is `cublasHgemm`, which computes and accumulates in fp16 according to the cuBLAS |
| 43 | documentation. That was not measured here. Its TFLOP/s is a half-accumulate figure; do not |
| 44 | compare it as if it were bf16 or fp8 with fp32 accumulate. |
| 45 | - Method (`cublas_sweep.cu`): |
| 46 | - Square N×N matrices, column-major, `CUBLAS_OP_N` on both operands, alpha 1, beta 0. |
| 47 | - Deterministic inputs: `0.001 * ((i % 97) - 48)`. |
| 48 | - 3 warm-up calls, then 5 timed calls with CUDA events. TFLOP/s is `2 N^3 / median`. |
| 49 | - The TFLOP/s column comes from the unrounded median. Recomputing it from the 4-decimal ms column |
| 50 | gives differences of up to 0.0172 TFLOP/s (Hgemm N=1024: 55.205 recomputed, 55.188 recorded). |
| 51 | This was checked with WolframLanguageEvaluator: |
| 52 | `N[2*{1024,1024,2048,2048,4096,4096}^3/({0.1371,0.0389,0.9690,0.2149,7.2832,1.4861}*10^-3)/10^12]` |
| 53 | -> `{15.6636, 55.2052, 17.7295, 79.9436, 18.8707, 92.4830}`, largest difference `0.017235`. |
| 54 | |
| 55 | ## Results (`cublas-gb10-20261114/sweep-timing.txt`) |
| 56 | |
| 57 | | Kernel | N | runs | median ms | min | max | spread | TFLOP/s | |
| 58 | | --- | --- | --- | --- | --- | --- | --- | --- | |
| 59 | | cublasSgemm | 1024 | 5 | 0.1371 | 0.1346 | 0.1405 | 0.0059 | 15.669 | |
| 60 | | cublasHgemm | 1024 | 5 | 0.0389 | 0.0384 | 0.0410 | 0.0026 | 55.188 | |
| 61 | | cublasSgemm | 2048 | 5 | 0.9690 | 0.9660 | 0.9772 | 0.0111 | 17.729 | |
| 62 | | cublasHgemm | 2048 | 5 | 0.2149 | 0.2140 | 0.2194 | 0.0054 | 79.927 | |
| 63 | | cublasSgemm | 4096 | 5 | 7.2832 | 7.2178 | 7.9190 | 0.7012 | 18.871 | |
| 64 | | cublasHgemm | 4096 | 5 | 1.4861 | 1.4804 | 1.4882 | 0.0077 | 92.484 | |
| 65 | |
| 66 | Clocks: |
| 67 | - `clocks-before.txt`: 48 °C, 5.66 W, 208 MHz. |
| 68 | - `clocks-after-timing.txt`: 49 °C, 22.19 W, 2405 MHz. |
| 69 | |
| 70 | ## Not shown |
| 71 | - Limiter analysis: NOT_RUN. `ncu` failed with `ERR_NVGPUCTRPERM` because the user cannot read GPU |
| 72 | performance counters (Linear DRA-570). Each `ncu-*-4096.txt` holds one sweep line printed under the |
| 73 | profiler (`runs=1`): Hgemm 2.0432 ms and Sgemm 7.4523 ms. Neither is a timing result. Quote only |
| 74 | the table above. |
| 75 | - The Sgemm N=4096 spread is 0.7012 ms (max 7.9190 ms). Re-check it once counters are readable. |
| 76 | - Coverage is five timed runs per row, in one window, on one chip. Other shapes, transposes, and the |
| 77 | bf16, fp8 and TF32 modes were not measured. This qualifies neither cuBLAS nor omega-blas. |
| 78 | |
| 79 | ## Check |
| 80 | `cd receipts/cublas-gb10-20261114 && sha256sum -c SHA256SUMS` |