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 / GEMM-TUNE-20261027 / AB-PLAN.md

120 lines · 8514 bytes Raw Blame History Source

GemmTune A/B plan (frozen before any GemmTune timing)

Lane GemmTune, 2026-10-27. Question: is the general-shape GEMM of CUDApp (src/omega_gpu_gemm.c, C3, PR #112) faster on branch perf/gemm-tiles than on main after #112 merges, per shape and type, and what fraction of the measured tensor-core ceiling does each reach.

Arms

Design

Shape set (both types, 17 shapes, 34 cells)

Serving shapes of the 35B (hidden 2048; weights [out][in], so layout 2 "A row B col"): 1x8192x2048 (q+gate decode), 16x12288x2048 (GDN in_proj, 16 rows), 512x8192x2048, 512x2048x4096 (o_proj), 2048x12288x2048, 2048x2048x4096 (out_proj), 64x1024x2048 (expert gate+up), 64x2048x512 (expert down), 2048x16384x2048 (one 16384-column slice of lm_head; the full 248320 is past OMEGA_GPU_GEMM_MAX_DIM). The #112 ladder, layout 0 "A row B row": 1024^3, 2048^3, 4096^3, 8192^3, 3000x5000x700, 64x8192x8192, 8192x64x8192, 1000x999x1001.

Correctness gate

Metrics

Verdict rule (per cell, on the primary metric; repeated on the secondary)

ratio r = median_B / median_A (times).

No re-run selection

One declared run. A re-run only for a documented machine fault (hold timeout, health failure, a chip error unrelated to the arms); both runs are then reported.

Exploration (EXPLORATORY, never verdict-bearing)

Before the A/B, tile choices for B's defaults are explored on a 5-shape set (--set explore: 512x8192x2048 L2, 2048x12288x2048 L2, 2048^3 L0, 4096^3 L0, 64x8192x8192 L0) with --cfg overrides and the packed-scratch switch AIEN_OMEGA_GEMM_PACK_CACHED=0|1, 2..3 passes each. These numbers choose B's defaults only; they are reported as EXPLORATORY with their logs and are not compared against A.

Driver

gemm_ab.c sha256 f6bb5b076bdc3162069edf35c5db574474c18c4c3541688a4f69521f8e1152ce

Amendment 1 (2026-10-27, after exploration hold explore1, before any A/B timing)

The original text above hashed to 762a59a9997956614831d5e92d043a3a8433cc335ab84616ba64a97339625767 (AB-PLAN.sha256.v0). Change: the driver accepts an optional sixth --cfg field band when compiled with -DGEMM_AB_BAND (exploration of the banded MAIN grid on B-side trees only). The A/B runs pass no --cfg, so both arms run their library defaults, and both arms compile the driver WITHOUT -DGEMM_AB_BAND (the same source compiles against main's header, checked against 1b5b4a6). Nothing else changes: shapes, rounds, discard rule, verdict rule, metrics. New driver sha256 57aa161edb8d91d5f57d7503b61fd56561f8fdc370674568fd438e05c7080a01 (replaces f6bb5b07...).

Amendment 2 (2026-10-27, documentation only, before any A/B timing)

Kernel identity (asked by Main after ExpertTensorCore/FINDINGS.md suspected the 6.79/14.05 figures came from a CUDA-core FFMA kernel): the figures are from build/gpu_gemm_test at 7a43c9e (evidence/C3-GEMM/cudapp-20261027-7a43c9e/02-gemm-full.log), which drives omega_gpu_gemm = src/omega_gpu_gemm.c, the kernel this plan measures. Read from the code at 1b5b4a6: its MAIN kernel issues BW_IR_HMMA_BF16 (mma(), line 52) for BF16 and the same op marked OMEGA_QMMA_MARK for E4M3, which omega_qmma_patch_code rewrites to native QMMA (host test: "qmma patches 32/64" per E4M3 MAIN kernel, 0 for BF16). So both types run on the tensor cores, not FFMA. It stages nothing in shared memory: the packs write operands in fragment order and MAIN reads them with LDG.E.128 straight from L2/DRAM, so the 16 KB QMD shared-memory cap (finding 1 of FINDINGS.md) does not bind this kernel; that cap and the T3 kernel (omega_blackwell_codegen_tc.c) are outside this A/B. No change to arms, shapes, rounds, discard or verdict rules.

Amendment 3 (2026-10-27 ~08:10Z, after the 7-round run, before any supplementary timing)

Finding from the 7-round run (receipts 03-ab-r*): main_ns is host wall time from submit to the completion marker, and with the default spin of 0 the wait is the platform's 50 us sleep-poll. The driver ran at nice -n 19 on cores 10-14 with host load1 16-34, and many samples of both arms sit at 2.98-3.00 ms (or 3.0-4.1 ms) whatever the shape: delayed wake-ups, not kernel time. Cells whose kernel is under a few ms are therefore not resolved by that run. Its verdicts stand as the plan's result and are reported unchanged.

Supplementary run S (predeclared here, reported beside the main run, never replacing it):