From b780c44f1c9b104583a98be43233ad8157c5def1 Mon Sep 17 00:00:00 2001 From: Drake Stapleton Date: Sun, 18 Oct 2026 08:00:29 -0500 Subject: [PATCH 1/2] FP8 GEMV and tensor-core GEMM take k up to 32768 for the Qwen3.8-27B down_proj (omega#541) OMEGA_FP8_MAX_K and the tcgemm k rule were 16384, set for the 30B shapes; the step kernel and the tensor-core kernel only loop over k, so 32768 is safe. Chip points at every 27B shape (gate/up/down/q/k/in_proj_qkv/in_proj_z/out_proj) and the q38down prefill GEMM (1024 tokens). Chip (GB10): gpu_fp8_api_test 30/30 PASS, q38 down 5120x17408 at 179 GB/s; gpu_tcgemm_test q38down PASS, 13.92 TFLOPS. Receipts in evidence/fp8-k32768-20261018/. Co-Authored-By: Claude Opus 5.5 --- README.md | 1 + evidence/fp8-k32768-20261018/SHA256SUMS | 13 ++ evidence/fp8-k32768-20261018/base-commit.txt | 1 + evidence/fp8-k32768-20261018/binary.sha256 | 2 + .../fp8-k32768-20261018/binary.sha256.note | 1 + evidence/fp8-k32768-20261018/change.diff | 126 ++++++++++++++++++ evidence/fp8-k32768-20261018/chip-fp8.log | 32 +++++ .../fp8-k32768-20261018/chip-tc-q38down.log | 11 ++ evidence/fp8-k32768-20261018/device.txt | 1 + evidence/fp8-k32768-20261018/fp8-host.log | 17 +++ evidence/fp8-k32768-20261018/fp8-sim.log | 64 +++++++++ evidence/fp8-k32768-20261018/receipt-fp8.json | 1 + .../receipt-tc-q38down.json | 1 + evidence/fp8-k32768-20261018/tc-host.log | 14 ++ evidence/fp8-k32768-20261018/tc-sim.log | 20 +++ src/omega_blackwell_codegen_moe.h | 2 +- src/omega_blackwell_codegen_tc.c | 2 +- src/omega_blackwell_codegen_tc.h | 3 +- tests/gpu_fp8_api_test.c | 16 ++- tests/gpu_tcgemm_test.c | 5 + 20 files changed, 327 insertions(+), 6 deletions(-) create mode 100644 evidence/fp8-k32768-20261018/SHA256SUMS create mode 100644 evidence/fp8-k32768-20261018/base-commit.txt create mode 100644 evidence/fp8-k32768-20261018/binary.sha256 create mode 100644 evidence/fp8-k32768-20261018/binary.sha256.note create mode 100644 evidence/fp8-k32768-20261018/change.diff create mode 100644 evidence/fp8-k32768-20261018/chip-fp8.log create mode 100644 evidence/fp8-k32768-20261018/chip-tc-q38down.log create mode 100644 evidence/fp8-k32768-20261018/device.txt create mode 100644 evidence/fp8-k32768-20261018/fp8-host.log create mode 100644 evidence/fp8-k32768-20261018/fp8-sim.log create mode 100644 evidence/fp8-k32768-20261018/receipt-fp8.json create mode 100644 evidence/fp8-k32768-20261018/receipt-tc-q38down.json create mode 100644 evidence/fp8-k32768-20261018/tc-host.log create mode 100644 evidence/fp8-k32768-20261018/tc-sim.log diff --git a/README.md b/README.md index 87f91fbf1..d7103a48f 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Research-grade and pre-alpha. Plainly: - **Omega Systems Core compiler:** OSC-0 is frozen as a design. OSC-1 and OSC-2 are implemented with host receipts and are NOT QUALIFIED. OSC-3 is in progress ([OSC-3-DESIGN](docs/osc/OSC-3-DESIGN.md)). It is not self-hosting and there is no general Omega compiler yet; the old Milestone 6 "self-host" result was a fixed-output self-copy check, not compilation ([note](docs/osc/OSC-1-SELF-HOST-STATEMENT.md)). - **Reaction runtime:** the R1 to R16 qualification ladder passed on builds that predate the composition modules (omega#126), a historical result. Requalification at `3108fc2` recorded R15 FAIL (14 of 16 gates: G1, G15) and R16 FAIL (`evidence/REQUAL-3108fc2/`); the R16 receipt `22d7a79a` at `850fc54` is invalid as a current claim because its script was later found defective; none of R1 to R16 is requalified on the current candidate, and the ladder rerun is in progress. The R16 loop-site inventory was reconciled on the candidate tree (502 sites, 0 unclassified, 0 stale, PR #279); that is the inventory gate only, not R16. The current living build is IMPLEMENTED / NOT QUALIFIED until re-qualified. Composition, Capability Graph, Skill Router, J-Space and Cortex run on the host; the Fabric interface is a host-only loopback with no network; none of this is on silicon as a qualified system. - **Numerics (E1):** closed 2026-10-02 on the GB10 chip campaign (Gate 5 26/26 with 47 parity lines, reductions SUM/MAX/MIN/MEAN, nine transcendental ops over all 2^32 inputs each, 148 load/store kernels), consolidated receipt `evidence/E1-CLOSURE/e7851c69d34ac777a9436af16d0bdd5d69264c8528c62d562b600f5d89153061.json`; exclusions (natural-base EXP/LOG have no GB10 kernel) are listed in [E1_GAP_TABLE](docs/numeric/E1_GAP_TABLE.md). +- **Qwen3.8-27B kernels (GB10, 2026-10-18):** each one is checked on the chip against a double-precision reference with deliberately broken variants that must fail, and none is joined into a serving engine yet. FP8 matrix-vector and the tensor-core prefill GEMM now take k up to 32768, which covers the 27B down projection at k = 17408 (`evidence/fp8-k32768-20261018/`, omega#541). - **Hardware:** results on the DGX Spark GB10 are tied to the exact commit in each receipt. Host and emulator passes are never reported as hardware qualification. The live status is owned by [aien-architecture](https://github.com/aien-spark/aien-architecture): [CURRENT_EXECUTION_PLAN.md](https://github.com/aien-spark/aien-architecture/blob/main/CURRENT_EXECUTION_PLAN.md) and [doctrine/ROADMAP.md](https://github.com/aien-spark/aien-architecture/blob/main/doctrine/ROADMAP.md). This file does not restate numbers that drift. Historical milestone receipts (for example Milestone 4, `OMEGA_SEMANTICS`, 12 of 12 gates) stay in `evidence/` unchanged as history. diff --git a/evidence/fp8-k32768-20261018/SHA256SUMS b/evidence/fp8-k32768-20261018/SHA256SUMS new file mode 100644 index 000000000..61c8f9a74 --- /dev/null +++ b/evidence/fp8-k32768-20261018/SHA256SUMS @@ -0,0 +1,13 @@ +bd258e389f422174dec6c3378a1957f8702de9993dd6c29248bfd2808037c1a1 ./base-commit.txt +1a4ecd055e0902f34eaa7bd1621834fb504013fc127bea846545c3e2f51c93ca ./binary.sha256 +fa8899a68256682178f9cbc887073cd74b553ccc254da1c798407d580776012f ./binary.sha256.note +c80c4eed550c1a8c526ceadbe338d6d5608dd240e0229ec84d0dd9d9b1c6932b ./change.diff +0c27ce038b6e6c60eaf9674f5ad421ad94c6c152a5a19aa0fce3db4f978fb754 ./chip-fp8.log +7fcc6703491d7df7af918ab45eb2193cc2e8d16b35abed08ad7140b3eb38cd8b ./chip-tc-q38down.log +e10477eaa13cff171ac37806d4862b80bd322a09233fa1a972c0b7b04f71d931 ./device.txt +3b931175e16058d35dcdf097116f53e821cc8eaf67fee1806a61c4b5145c71df ./fp8-host.log +74449edaee59ce548ae0e14a70d36fda1ba438171d084c3b8ed7cd004862e55a ./fp8-sim.log +f3fcbb7bc661f2cfad7e24e22bfb37b0a5ac4a12916feea7af9cca4508ac8fe9 ./receipt-fp8.json +a25e4e2b08c90d67affe0df4943f3869526e3a8ce0691ca125631a5e4530e238 ./receipt-tc-q38down.json +de959343ee93a606313b1228d394a7ae2c26b74e455db9013e6ab20537fe86e4 ./tc-host.log +7b6601d5fb8116ec6fa7bc23539027b0ba832298f444f85048bed3c59ec6ffe7 ./tc-sim.log diff --git a/evidence/fp8-k32768-20261018/base-commit.txt b/evidence/fp8-k32768-20261018/base-commit.txt new file mode 100644 index 000000000..b030b48c2 --- /dev/null +++ b/evidence/fp8-k32768-20261018/base-commit.txt @@ -0,0 +1 @@ +f4a9849fb127f8d2d664dfc56890752ad180c507 diff --git a/evidence/fp8-k32768-20261018/binary.sha256 b/evidence/fp8-k32768-20261018/binary.sha256 new file mode 100644 index 000000000..c88972003 --- /dev/null +++ b/evidence/fp8-k32768-20261018/binary.sha256 @@ -0,0 +1,2 @@ +5e09e4cacf48855e73f48bcf6137bfa6bcf15e26274e11c714a9c88c174082ff build/gpu_fp8_api_test +0360fe096afdec04789e063d1febab2608e63ba261cff8be210a49546d8b20c7 build/gpu_tcgemm_test diff --git a/evidence/fp8-k32768-20261018/binary.sha256.note b/evidence/fp8-k32768-20261018/binary.sha256.note new file mode 100644 index 000000000..7d75ffb10 --- /dev/null +++ b/evidence/fp8-k32768-20261018/binary.sha256.note @@ -0,0 +1 @@ +binaries built 06:52-06:53 local, before change.diff (06:53:15) and both chip runs; build/ not rebuilt since diff --git a/evidence/fp8-k32768-20261018/change.diff b/evidence/fp8-k32768-20261018/change.diff new file mode 100644 index 000000000..efaaf9245 --- /dev/null +++ b/evidence/fp8-k32768-20261018/change.diff @@ -0,0 +1,126 @@ +diff --git a/src/omega_blackwell_codegen_moe.h b/src/omega_blackwell_codegen_moe.h +index 4140f2fc..97bdcbff 100644 +--- a/src/omega_blackwell_codegen_moe.h ++++ b/src/omega_blackwell_codegen_moe.h +@@ -59,7 +59,7 @@ extern "C" { + #define OMEGA_FP8_X_EXP 64 /* x' = x * 2^64 (host, exact) */ + #define OMEGA_FP8_SCALE_EXP 56 /* S' = S * 2^56 (host, exact for every finite bf16 scale below 2^72) */ + #define OMEGA_FP8_BLOCK 128u /* scale block (rows and columns) */ +-#define OMEGA_FP8_MAX_K 16384u ++#define OMEGA_FP8_MAX_K 32768u /* the step kernel and the tensor-core kernel loop over k; 17408 is the Qwen3.8-27B down_proj (omega#541) */ + #define OMEGA_FP8_MAX_GROUPS 64u /* group table entries per launch buffer (8 experts today) */ + + /* argument word offsets */ +diff --git a/src/omega_blackwell_codegen_tc.c b/src/omega_blackwell_codegen_tc.c +index 1b7f55df..6b5f14f9 100644 +--- a/src/omega_blackwell_codegen_tc.c ++++ b/src/omega_blackwell_codegen_tc.c +@@ -40,7 +40,7 @@ int omega_blackwell_codegen_tc_probe_prog(int mutant, BlackwellIRProgram *prog) + + int omega_tcgemm_spec_ok(const OmegaTcGemmSpec *s) { + if (!s) return 0; +- if (s->k < 128u || s->k > 16384u || s->k % 128u) return 0; ++ if (s->k < 128u || s->k > OMEGA_TCGEMM_MAX_K || s->k % 128u) return 0; + if (s->rt != 1 && s->rt != 2 && s->rt != 4) return 0; + if (s->ct != 1 && s->ct != 2 && s->ct != 4) return 0; + if (s->rt * s->ct < 4u) return 0; /* >= 4 independent HMMAs between dependent ones (8 cycles each, nvcc's 29-cycle rule) */ +diff --git a/src/omega_blackwell_codegen_tc.h b/src/omega_blackwell_codegen_tc.h +index cc5c8e56..b1374ef5 100644 +--- a/src/omega_blackwell_codegen_tc.h ++++ b/src/omega_blackwell_codegen_tc.h +@@ -48,8 +48,9 @@ int omega_blackwell_codegen_tc_probe_prog(int mutant, BlackwellIRProgram *prog); + * Grid: grid_x = n / (warps * 8 * ct) (exact), grid_y = tiles. CTA: 32 * warps threads; shared 2 * 16 * rt * 128 bytes. + * mutant (tests only): 1 drops the block scale, 2 never advances the scale pointer, 3 row tile i reads tile i^1 (rt >= 2), + * 4 drops the last 64-element chunk of every 128 block. Each must be caught. */ ++#define OMEGA_TCGEMM_MAX_K 32768u /* the K loop runs KB = k / 128 iterations; nothing else grows with k (omega#541) */ + typedef struct { +- uint32_t k; /* multiple of 128, 128 .. 16384 */ ++ uint32_t k; /* multiple of 128, 128 .. OMEGA_TCGEMM_MAX_K */ + uint32_t rt; /* row tiles (16 rows) per CTA: 1, 2 or 4 */ + uint32_t ct; /* column tiles (8 weight rows) per warp: 1, 2 or 4; rt * ct >= 4 */ + uint32_t warps; /* 1, 2, 4 or 8; (16 * rt * 8) % (32 * warps) == 0 */ +diff --git a/tests/gpu_fp8_api_test.c b/tests/gpu_fp8_api_test.c +index bec0db1b..bb9a9c1d 100644 +--- a/tests/gpu_fp8_api_test.c ++++ b/tests/gpu_fp8_api_test.c +@@ -156,7 +156,7 @@ static void host_only(void) { + CHECK(o[0] == ldexpf(1.0f, 64) && o[1] == ldexpf(-2.0f, 64) && o[3] == 0.0f, "x fold exact"); } + + /* 3. codegen: every shape builds inside the budgets; refusals */ +- static const uint32_t ks[] = { 128, 256, 768, 2048, 4096, 16384 }; ++ static const uint32_t ks[] = { 128, 256, 768, 2048, 4096, 16384, 17408, 32768 }; + static const uint32_t lbs[] = { 8, 16 }, rows[] = { 1, 2, 4, 8 }; + uint32_t worst_insns = 0, worst_gprs = 0; int built = 0; + for (size_t a = 0; a < sizeof ks / sizeof ks[0]; a++) for (size_t b = 0; b < 2; b++) for (size_t c = 0; c < 4; c++) for (int m = 0; m <= 3; m++) for (int deep = 0; deep < 2; deep++) { +@@ -175,7 +175,7 @@ static void host_only(void) { + bad.k = 2048; bad.rows = 3; CHECK(omega_fp8_gemv_prog_stats(&bad, NULL, NULL) != 0, "rows 3 refused"); + bad.rows = 8; bad.warps = 33; CHECK(omega_fp8_gemv_prog_stats(&bad, NULL, NULL) != 0, "warps 33 refused"); + bad.warps = 8; bad.lane_bytes = 32; CHECK(omega_fp8_gemv_prog_stats(&bad, NULL, NULL) != 0, "lane_bytes 32 refused"); +- bad.lane_bytes = 16; bad.k = 32768; CHECK(omega_fp8_gemv_prog_stats(&bad, NULL, NULL) != 0, "k past the limit refused"); } ++ bad.lane_bytes = 16; bad.k = OMEGA_FP8_MAX_K + 512u; CHECK(omega_fp8_gemv_prog_stats(&bad, NULL, NULL) != 0, "k past the limit refused"); } + /* Register file (chip-found 2026-10-13): 32 * warps * declared registers must be <= 65536; the API refuses the launch. + * The deep k=2048 kernel at 32 warps (72 declared x 1024 threads = 73728) faulted on the chip with Xid 13. */ + { OmegaFp8GemvSpec deep = { .k = 2048, .lane_bytes = 16, .rows = 1, .warps = 32, .depth = 4 }; uint32_t gp = 0; +@@ -192,7 +192,7 @@ static void host_only(void) { + { OmegaGpuFp8Tensor *t = NULL; uint8_t w[128 * 128]; uint16_t s[1] = { bf16_of(1.0f) }; memset(w, 0x38, sizeof w); + CHECK(omega_gpu_fp8_tensor_upload(1, 128, 128, NULL, s, &t) == OMEGA_GPU_FP8_BAD_ARGS, "NULL w refused"); + CHECK(omega_gpu_fp8_tensor_upload(1, 100, 128, w, s, &t) == OMEGA_GPU_FP8_BAD_ARGS, "n not a multiple of 128 refused"); +- CHECK(omega_gpu_fp8_tensor_upload(1, 128, 32768, w, s, &t) == OMEGA_GPU_FP8_TOO_LARGE, "k past the limit refused"); ++ CHECK(omega_gpu_fp8_tensor_upload(1, 128, OMEGA_FP8_MAX_K + 256u, w, s, &t) == OMEGA_GPU_FP8_TOO_LARGE, "k past the limit refused"); + w[77] = 0xff; CHECK(omega_gpu_fp8_tensor_upload(1, 128, 128, w, s, &t) == OMEGA_GPU_FP8_NAN_WEIGHT && t == NULL, "NaN weight refused before any device work"); + CHECK(strstr(omega_gpu_fp8_last_error(), "byte 77") != NULL, "error names the byte (%s)", omega_gpu_fp8_last_error()); + float y[8]; CHECK(omega_gpu_fp8_gemv_f32(NULL, 0, y, y, NULL) == OMEGA_GPU_FP8_BAD_ARGS, "NULL tensor refused"); } +@@ -336,6 +336,7 @@ static void sim_battery(uint32_t cta_budget) { + { 6, 256, 768, 8, 8, 8, 4, 8, "8 groups per-group x, repeated ids (down)" }, + { 3, 128, 256, 2, 2, 8, 8, 4, "2 groups per-group x" }, + { 2, 256, 768, 2, 2, 8, 1, 7, "k768 w7: partial staging round (deep)" }, ++ { 1, 128, 17408, 1, 1, 16, 2, 8, "k17408 lb16 r2 w8 (Qwen3.8-27B down width, step kernel)" }, + }; + const size_t npts = sizeof pts / sizeof pts[0]; + double worst_all = 0.0; +@@ -469,6 +470,15 @@ static int chip_run(const char *out_path, uint32_t reps) { + { 8, 2048, 768, 8, 8, "8 experts down per-group x", 1 }, + { 16, 1536, 2048, 8, 1, "8 of 16 experts gate+up", 1 }, + { 1, 16384, 2048, 1, 1, "large 16384x2048", 1 }, ++ /* Qwen3.8-27B dense shapes (omega#541) and the new width cap */ ++ { 1, 17408, 5120, 1, 1, "q38 gate 17408x5120", 1 }, ++ { 1, 5120, 17408, 1, 1, "q38 down 5120x17408", 1 }, ++ { 1, 12288, 5120, 1, 1, "q38 q_proj 12288x5120", 1 }, ++ { 1, 1024, 5120, 1, 1, "q38 k_proj 1024x5120", 1 }, ++ { 1, 10240, 5120, 1, 1, "q38 in_proj_qkv 10240x5120", 1 }, ++ { 1, 6144, 5120, 1, 1, "q38 in_proj_z 6144x5120", 1 }, ++ { 1, 5120, 6144, 1, 1, "q38 out_proj 5120x6144", 1 }, ++ { 1, 256, 32768, 1, 1, "width cap 256x32768", 1 }, + }; + /* 0. one-hot conversion on the chip: row r holds code r at column 0 (NaN codes as 0x00), x = e_0, scale 1. + * y[r] must equal the reference bit for bit. The e4m3 subnormal codes 0x01..0x07 (and negatives) travel +diff --git a/tests/gpu_tcgemm_test.c b/tests/gpu_tcgemm_test.c +index aaddd094..dfc43adc 100644 +--- a/tests/gpu_tcgemm_test.c ++++ b/tests/gpu_tcgemm_test.c +@@ -112,6 +112,7 @@ static int host_only(void) { + /* production shapes: instructions and registers (declared = peak + 2 rounded to 8 <= 128; 32 * warps * declared <= 65536) */ + static const OmegaTcGemmSpec shapes[] = { + { 2048, 4, 2, 8, 0 }, { 768, 4, 2, 8, 0 }, { 4096, 4, 2, 8, 0 }, { 2048, 4, 1, 8, 0 }, { 2048, 2, 2, 4, 0 }, { 2048, 4, 2, 4, 0 }, { 768, 4, 2, 4, 0 }, ++ { 5120, 4, 2, 8, 0 }, { 17408, 4, 2, 8, 0 }, { 32768, 4, 2, 8, 0 }, /* Qwen3.8-27B widths and the new cap (omega#541) */ + }; + static BlackwellIRProgram prog; + for (size_t i = 0; i < sizeof shapes / sizeof shapes[0]; i++) { +@@ -181,6 +182,7 @@ static int sim_tests(void) { + { 2, 256, 256, 20, 7, 0, { 256, 4, 1, 8, 0 } }, + { 2, 128, 256, 33, 5, 1, { 256, 1, 4, 4, 0 } }, + { 1, 512, 256, 64, 64, 0, { 256, 4, 2, 8, 0 } }, /* dense: one expert, four CTAs across n */ ++ { 1, 128, 17408, 64, 64, 0, { 17408, 4, 2, 8, 0 } }, /* Qwen3.8-27B down width (omega#541) */ + }; + for (size_t i = 0; i < sizeof pts / sizeof pts[0]; i++) { + Prob p; prob_make(&p, pts[i].E, pts[i].n, pts[i].k, pts[i].M, pts[i].xr, pts[i].skew); +@@ -271,6 +273,9 @@ int chip_tests(int argc, char **argv) { + uint32_t E, n, k; + if (!strcmp(shape, "gateup")) { E = 128; n = 1536; k = 2048; } else if (!strcmp(shape, "down")) { E = 128; n = 2048; k = 768; } + else if (!strcmp(shape, "qkv")) { E = 1; n = 5120; k = 2048; } else if (!strcmp(shape, "o")) { E = 1; n = 2048; k = 4096; } ++ /* Qwen3.8-27B dense shapes (omega#541): MLP gate or up, down (k 17408), DeltaNet in_proj_qkv, out_proj / o_proj */ ++ else if (!strcmp(shape, "q38gate")) { E = 1; n = 17408; k = 5120; } else if (!strcmp(shape, "q38down")) { E = 1; n = 5120; k = 17408; } ++ else if (!strcmp(shape, "q38qkv")) { E = 1; n = 10240; k = 5120; } else if (!strcmp(shape, "q38o")) { E = 1; n = 5120; k = 6144; } + else { printf("unknown shape %s\n", shape); return 1; } + const uint32_t M = E == 1 ? tokens : tokens * 8u; + if (reps > 64) reps = 64; diff --git a/evidence/fp8-k32768-20261018/chip-fp8.log b/evidence/fp8-k32768-20261018/chip-fp8.log new file mode 100644 index 000000000..5dab4dde5 --- /dev/null +++ b/evidence/fp8-k32768-20261018/chip-fp8.log @@ -0,0 +1,32 @@ +chip one-hot conversion: rc=OK 256/256 rows exact (subnormal codes 0x01..0x07 included: no flush to zero) +chip k256 n128 variant=1 rc=OK bad=0 worst_rel=3.713e-08 grid=16x1 lb=8 rows=1 warps=8 depth=1 bytes=32776 upload=0.1ms chip_med=16.8us (1.9 GB/s) call_med=22.8us (1.4 GB/s) reps=20 +chip k768 n256 variant=1 rc=OK bad=0 worst_rel=2.681e-08 grid=32x1 lb=8 rows=1 warps=8 depth=3 bytes=196656 upload=0.3ms chip_med=21.1us (9.3 GB/s) call_med=30.1us (6.5 GB/s) reps=20 +chip k2048 n384 variant=1 rc=OK bad=0 worst_rel=2.689e-08 grid=48x1 lb=16 rows=1 warps=8 depth=4 bytes=786624 upload=0.6ms chip_med=25.3us (31.1 GB/s) call_med=40.3us (19.5 GB/s) reps=20 +chip gate 768x2048 variant=1 rc=OK bad=0 worst_rel=3.011e-08 grid=96x1 lb=16 rows=1 warps=8 depth=4 bytes=1573248 upload=0.9ms chip_med=24.5us (64.2 GB/s) call_med=40.3us (39.0 GB/s) reps=20 +chip gate+up 1536x2048 variant=1 rc=OK bad=0 worst_rel=2.434e-08 grid=192x1 lb=16 rows=1 warps=8 depth=4 bytes=3146496 upload=1.6ms chip_med=33.6us (93.7 GB/s) call_med=49.6us (63.5 GB/s) reps=20 +chip gate+up 1536x2048 mutant 1: caught (rc=OK bad=1536 worst_rel=2.507e-01) +chip gate+up 1536x2048 mutant 2: caught (rc=OK bad=1535 worst_rel=1.913e-01) +chip gate+up 1536x2048 mutant 4: caught (rc=OK bad=1536 worst_rel=2.507e-01) +chip down 2048x768 variant=1 rc=OK bad=0 worst_rel=4.271e-08 grid=256x1 lb=8 rows=1 warps=8 depth=3 bytes=1573248 upload=0.9ms chip_med=40.2us (39.2 GB/s) call_med=50.9us (30.9 GB/s) reps=20 +chip q_proj 4096x2048 variant=1 rc=OK bad=0 worst_rel=2.705e-08 grid=256x1 lb=16 rows=1 warps=8 depth=0 bytes=8390656 upload=3.6ms chip_med=59.2us (141.7 GB/s) call_med=63.2us (132.8 GB/s) reps=20 +chip k_proj 512x2048 variant=1 rc=OK bad=0 worst_rel=2.309e-08 grid=64x1 lb=16 rows=1 warps=8 depth=4 bytes=1048832 upload=0.6ms chip_med=21.6us (48.5 GB/s) call_med=36.8us (28.5 GB/s) reps=20 +chip o_proj 2048x4096 variant=1 rc=OK bad=0 worst_rel=2.168e-08 grid=256x1 lb=16 rows=1 warps=8 depth=0 bytes=8390656 upload=4.3ms chip_med=68.8us (122.0 GB/s) call_med=71.7us (117.0 GB/s) reps=20 +chip qkv fused 5120x2048 variant=1 rc=OK bad=0 worst_rel=3.281e-08 grid=256x1 lb=16 rows=1 warps=8 depth=0 bytes=10488320 upload=4.9ms chip_med=90.3us (116.2 GB/s) call_med=94.7us (110.8 GB/s) reps=20 +chip 8 experts gate+up shared x variant=1 rc=OK bad=0 worst_rel=3.010e-08 grid=6x8 lb=16 rows=1 warps=32 depth=0 bytes=25171968 upload=11.4ms chip_med=164.1us (153.4 GB/s) call_med=172.2us (146.2 GB/s) reps=20 +chip 8 experts gate+up shared x mutant 1: caught (rc=OK bad=12288 worst_rel=2.601e-01) +chip 8 experts gate+up shared x mutant 2: caught (rc=OK bad=12287 worst_rel=2.790e-01) +chip 8 experts gate+up shared x mutant 3: caught (rc=OK bad=12288 worst_rel=4.290e-01) +chip 8 experts gate+up shared x mutant 4: caught (rc=OK bad=12288 worst_rel=2.601e-01) +chip 8 experts down per-group x variant=1 rc=OK bad=0 worst_rel=4.885e-08 grid=6x8 lb=8 rows=1 warps=32 depth=0 bytes=12585984 upload=5.3ms chip_med=89.8us (140.1 GB/s) call_med=101.5us (124.0 GB/s) reps=20 +chip 8 of 16 experts gate+up variant=1 rc=OK bad=0 worst_rel=3.255e-08 grid=6x8 lb=16 rows=1 warps=32 depth=0 bytes=25171968 upload=22.4ms chip_med=148.6us (169.4 GB/s) call_med=156.9us (160.4 GB/s) reps=20 +chip large 16384x2048 variant=1 rc=OK bad=0 worst_rel=3.250e-08 grid=256x1 lb=16 rows=1 warps=8 depth=0 bytes=33562624 upload=15.3ms chip_med=198.2us (169.3 GB/s) call_med=208.9us (160.6 GB/s) reps=20 +chip q38 gate 17408x5120 variant=1 rc=OK bad=0 worst_rel=2.265e-08 grid=256x1 lb=16 rows=1 warps=8 depth=0 bytes=89150720 upload=37.6ms chip_med=470.0us (189.7 GB/s) call_med=482.2us (184.9 GB/s) reps=20 +chip q38 down 5120x17408 variant=1 rc=OK bad=0 worst_rel=1.367e-08 grid=256x1 lb=16 rows=1 warps=8 depth=0 bytes=89150720 upload=39.7ms chip_med=497.8us (179.1 GB/s) call_med=505.9us (176.2 GB/s) reps=20 +chip q38 q_proj 12288x5120 variant=1 rc=OK bad=0 worst_rel=2.324e-08 grid=256x1 lb=16 rows=1 warps=8 depth=0 bytes=62929920 upload=27.4ms chip_med=347.8us (180.9 GB/s) call_med=357.2us (176.2 GB/s) reps=20 +chip q38 k_proj 1024x5120 variant=1 rc=OK bad=0 worst_rel=2.100e-08 grid=128x1 lb=16 rows=1 warps=8 depth=0 bytes=5244160 upload=2.5ms chip_med=56.3us (93.1 GB/s) call_med=59.1us (88.7 GB/s) reps=20 +chip q38 in_proj_qkv 10240x5120 variant=1 rc=OK bad=0 worst_rel=2.163e-08 grid=256x1 lb=16 rows=1 warps=8 depth=0 bytes=52441600 upload=22.6ms chip_med=291.5us (179.9 GB/s) call_med=299.6us (175.1 GB/s) reps=20 +chip q38 in_proj_z 6144x5120 variant=1 rc=OK bad=0 worst_rel=2.183e-08 grid=256x1 lb=16 rows=1 warps=8 depth=0 bytes=31464960 upload=14.2ms chip_med=231.5us (135.9 GB/s) call_med=237.1us (132.7 GB/s) reps=20 +chip q38 out_proj 5120x6144 variant=1 rc=OK bad=0 worst_rel=1.806e-08 grid=256x1 lb=16 rows=1 warps=8 depth=0 bytes=31464960 upload=14.2ms chip_med=161.0us (195.4 GB/s) call_med=166.5us (189.0 GB/s) reps=20 +chip width cap 256x32768 variant=1 rc=OK bad=0 worst_rel=1.208e-08 grid=32x1 lb=16 rows=1 warps=8 depth=0 bytes=8390656 upload=3.5ms chip_med=154.0us (54.5 GB/s) call_med=163.2us (51.4 GB/s) reps=20 +gpu_fp8_api_test: 30 checks, 0 failed: PASS +rc=0 diff --git a/evidence/fp8-k32768-20261018/chip-tc-q38down.log b/evidence/fp8-k32768-20261018/chip-tc-q38down.log new file mode 100644 index 000000000..479599117 --- /dev/null +++ b/evidence/fp8-k32768-20261018/chip-tc-q38down.log @@ -0,0 +1,11 @@ +chip q38down: 1024 tokens, M 1024 rows, 1 segments, 16 tiles, grid 40 x 16, rt 4 ct 2 warps 8, declared 128 registers +chip bit-identity: 0 of 1966080 sampled outputs (384 rows) differ from the emulation (bit-identical) +chip second call: identical +chip mutant 1: caught (5242880 of 5242880 differ) +chip mutant 2: caught (5242880 of 5242880 differ) +chip mutant 3: caught (5242880 of 5242880 differ) +chip mutant 4: caught (5242880 of 5242880 differ) +TCGEMM q38down (medians of 9): chip 13111.2 us, call 32699.0 us; 13.92 TFLOPS; weights streamed 1426 MB (108.8 GB/s), activations gathered 1426 MB, output 21 MB; total 219.1 GB/s +chip: PASS +GPU_TCGEMM: PASS +rc=0 diff --git a/evidence/fp8-k32768-20261018/device.txt b/evidence/fp8-k32768-20261018/device.txt new file mode 100644 index 000000000..d3aae10ea --- /dev/null +++ b/evidence/fp8-k32768-20261018/device.txt @@ -0,0 +1 @@ +NVIDIA GB10, 580.173.02, 53, 208 MHz diff --git a/evidence/fp8-k32768-20261018/fp8-host.log b/evidence/fp8-k32768-20261018/fp8-host.log new file mode 100644 index 000000000..5dcca412a --- /dev/null +++ b/evidence/fp8-k32768-20261018/fp8-host.log @@ -0,0 +1,17 @@ +conversion: 254/256 exact, 2 NaN codes refused, 14 codes travel as f32 subnormals (2^-129 .. 7 * 2^-129): the chip must not flush them +codegen: 244 kernels built, largest 884 IR instructions, peak 88 GPRs +nvdisasm k2048_lb16_r8: rc=0 insns=832 undecodable=0 missing=0 (/tmp/omega_fp8_k2048_lb16_r8_3409907.sass) +nvdisasm k2048_lb16_r1_deep4: rc=0 insns=456 undecodable=0 missing=0 (/tmp/omega_fp8_k2048_lb16_r1_deep4_3409907.sass) +nvdisasm k768_lb8_r2: rc=0 insns=168 undecodable=0 missing=0 (/tmp/omega_fp8_k768_lb8_r2_3409907.sass) +v2 codegen k=768 lb=8 rows=1: 250 insns, peak 52 GPRs, declared 56 +v2 codegen k=768 lb=8 rows=2: 401 insns, peak 66 GPRs, declared 72 +v2 codegen k=768 lb=8 rows=4: 703 insns, peak 94 GPRs, declared 96 +v2 codegen k=2048 lb=16 rows=1: 473 insns, peak 74 GPRs, declared 80 +v2 codegen k=2048 lb=16 rows=2: 838 insns, peak 108 GPRs, declared 112 +v2 codegen k=4096 lb=16 rows=1: 877 insns, peak 114 GPRs, declared 120 +v2 codegen: 24 kernels built, largest 877 IR instructions, peak 114 GPRs +v2 k=768 rows=1 warps=16: declared 56 registers, 28672 per SM at one CTA +v2 k=2048 rows=1 warps=16: declared 80 registers, 40960 per SM at one CTA +v2 k=4096 rows=1 warps=16: declared 120 registers, 61440 per SM at one CTA +nvdisasm v2_k2048_lb16_r1_w16: rc=0 insns=480 undecodable=0 missing=0 (/tmp/omega_fp8_v2_k2048_lb16_r1_w16_3409907.sass) +gpu_fp8_api_test: 1610 checks, 0 failed: PASS diff --git a/evidence/fp8-k32768-20261018/fp8-sim.log b/evidence/fp8-k32768-20261018/fp8-sim.log new file mode 100644 index 000000000..df8e74c30 --- /dev/null +++ b/evidence/fp8-k32768-20261018/fp8-sim.log @@ -0,0 +1,64 @@ +sim one-hot conversion: 256/256 rows exact +sim k256 lb8 r1 w1 rc=0 worst_rel=4.868e-08 bad=0 (7 ms) +sim k256 lb8 r1 w1 deep rc=0 worst_rel=4.868e-08 bad=0 (6 ms) +sim k256 lb8 r2 w2 rc=0 worst_rel=3.955e-08 bad=0 (11 ms) +sim k256 lb8 r2 w2 mutant 1: caught (rc=0 bad=256 worst_rel=4.659e-01) +sim k256 lb8 r2 w2 mutant 2: one K step, control not applicable +sim k256 lb8 r2 w2 mutant 4: caught (rc=0 bad=256 worst_rel=4.659e-01) +sim k256 lb8 r2 w2 deep rc=0 worst_rel=3.955e-08 bad=0 (9 ms) +sim k256 lb8 r2 w2 deep mutant 1: caught (rc=0 bad=256 worst_rel=4.659e-01) +sim k256 lb8 r2 w2 mutant 2: one K step, control not applicable +sim k256 lb8 r2 w2 deep mutant 4: caught (rc=0 bad=256 worst_rel=4.659e-01) +sim k768 lb8 r4 w8 (down shape width) rc=0 worst_rel=3.352e-08 bad=0 (22 ms) +sim k768 lb8 r4 w8 (down shape width) deep rc=0 worst_rel=3.352e-08 bad=0 (23 ms) +sim k768 lb8 r8 rc=0 worst_rel=3.023e-08 bad=0 (23 ms) +sim k2048 lb16 r8 w8 (gate shape width) rc=0 worst_rel=2.818e-08 bad=0 (77 ms) +sim k2048 lb16 r8 w8 (gate shape width) mutant 1: caught (rc=0 bad=384 worst_rel=2.819e-01) +sim k2048 lb16 r8 w8 (gate shape width) mutant 2: caught (rc=0 bad=383 worst_rel=1.578e-01) +sim k2048 lb16 r8 w8 (gate shape width) mutant 4: caught (rc=0 bad=384 worst_rel=2.819e-01) +sim k2048 lb16 r1 rc=0 worst_rel=2.044e-08 bad=0 (15 ms) +sim k2048 lb16 r1 deep rc=0 worst_rel=2.044e-08 bad=0 (13 ms) +sim k512 lb16 r2 w3 (odd warps, tail row groups) rc=0 worst_rel=4.748e-08 bad=0 (7 ms) +sim k512 lb16 r2 w3 (odd warps, tail row groups) deep rc=0 worst_rel=4.748e-08 bad=0 (7 ms) +sim 4 experts shared x (gate+up) rc=0 worst_rel=2.646e-08 bad=0 (90 ms) +sim 4 experts shared x (gate+up) mutant 1: caught (rc=0 bad=1024 worst_rel=2.538e-01) +sim 4 experts shared x (gate+up) mutant 2: caught (rc=0 bad=1024 worst_rel=1.503e-01) +sim 4 experts shared x (gate+up) mutant 3: caught (rc=0 bad=1024 worst_rel=3.976e-01) +sim 4 experts shared x (gate+up) mutant 4: caught (rc=0 bad=1024 worst_rel=2.538e-01) +sim 8 groups per-group x, repeated ids (down) rc=0 worst_rel=4.441e-08 bad=0 (79 ms) +sim 8 groups per-group x, repeated ids (down) mutant 1: caught (rc=0 bad=2047 worst_rel=5.011e-01) +sim 8 groups per-group x, repeated ids (down) mutant 2: caught (rc=0 bad=2048 worst_rel=6.440e-01) +sim 8 groups per-group x, repeated ids (down) mutant 3: caught (rc=0 bad=2048 worst_rel=8.668e-01) +sim 8 groups per-group x, repeated ids (down) mutant 4: caught (rc=0 bad=2047 worst_rel=5.011e-01) +sim 8 groups per-group x, repeated ids (down) deep rc=0 worst_rel=4.441e-08 bad=0 (78 ms) +sim 8 groups per-group x, repeated ids (down) deep mutant 1: caught (rc=0 bad=2047 worst_rel=5.011e-01) +sim 8 groups per-group x, repeated ids (down) deep mutant 2: caught (rc=0 bad=2048 worst_rel=6.440e-01) +sim 8 groups per-group x, repeated ids (down) deep mutant 3: caught (rc=0 bad=2048 worst_rel=8.668e-01) +sim 8 groups per-group x, repeated ids (down) deep mutant 4: caught (rc=0 bad=2047 worst_rel=5.011e-01) +sim 2 groups per-group x rc=0 worst_rel=7.101e-08 bad=0 (4 ms) +sim 2 groups per-group x deep rc=0 worst_rel=7.101e-08 bad=0 (4 ms) +sim k768 w7: partial staging round (deep) rc=0 worst_rel=2.724e-08 bad=0 (24 ms) +sim k768 w7: partial staging round (deep) deep rc=0 worst_rel=2.724e-08 bad=0 (23 ms) +sim k17408 lb16 r2 w8 (Qwen3.8-27B down width, step kernel) rc=0 worst_rel=1.111e-08 bad=0 (105 ms) +sim battery: worst relative error 7.101e-08 over 12 points, 13361904 warp issues +sim v2 k2048 lb16 r1 w8 (gate_up/qkv width) rc=0 worst_rel=2.463e-08 bad=0 identical_to_v1=1 (26 ms) +sim v2 k2048 lb16 r1 w8 (gate_up/qkv width) mutant 1: caught (rc=0 bad=256 worst_rel=2.218e-01, identity check differs=1) +sim v2 k2048 lb16 r1 w8 (gate_up/qkv width) mutant 2: caught (rc=0 bad=256 worst_rel=1.690e-01, identity check differs=1) +sim v2 k2048 lb16 r2 w8 (128 B per lane) rc=0 worst_rel=2.578e-08 bad=0 identical_to_v1=1 (25 ms) +sim v2 k4096 lb16 r1 w8 (o_proj width) rc=0 worst_rel=1.878e-08 bad=0 identical_to_v1=1 (51 ms) +sim v2 k768 lb8 r1 w8 (down width) rc=0 worst_rel=2.677e-08 bad=0 identical_to_v1=1 (11 ms) +sim v2 k768 lb8 r4 w8 rc=0 worst_rel=3.253e-08 bad=0 identical_to_v1=1 (10 ms) +sim v2 k768 w7: partial staging round rc=0 worst_rel=3.262e-08 bad=0 identical_to_v1=1 (23 ms) +sim v2 4 experts shared x (gate_up) rc=0 worst_rel=2.472e-08 bad=0 identical_to_v1=1 (122 ms) +sim v2 4 experts shared x (gate_up) mutant 1: caught (rc=0 bad=1022 worst_rel=2.155e-01, identity check differs=1) +sim v2 4 experts shared x (gate_up) mutant 2: caught (rc=0 bad=1024 worst_rel=1.745e-01, identity check differs=1) +sim v2 4 experts shared x (gate_up) mutant 3: caught (rc=0 bad=1024 worst_rel=3.980e-01, identity check differs=1) +sim v2 8 groups per-group x, repeated ids (down) rc=0 worst_rel=4.875e-08 bad=0 identical_to_v1=1 (84 ms) +sim v2 8 groups per-group x, repeated ids (down) mutant 1: caught (rc=0 bad=2048 worst_rel=3.773e-01, identity check differs=1) +sim v2 8 groups per-group x, repeated ids (down) mutant 2: caught (rc=0 bad=2048 worst_rel=5.105e-01, identity check differs=1) +sim v2 8 groups per-group x, repeated ids (down) mutant 3: caught (rc=0 bad=2048 worst_rel=1.327e+00, identity check differs=1) +sim v2 2 groups per-group x, r8 k256 rc=0 worst_rel=5.595e-08 bad=0 identical_to_v1=1 (4 ms) +sim v2 k512 w3 (odd warps, tail row groups) rc=0 worst_rel=4.233e-08 bad=0 identical_to_v1=1 (8 ms) +sim v2 battery: 10/10 points bit-identical to variant 1 +gpu_fp8_api_test: 71 checks, 0 failed: PASS +rc=0 diff --git a/evidence/fp8-k32768-20261018/receipt-fp8.json b/evidence/fp8-k32768-20261018/receipt-fp8.json new file mode 100644 index 000000000..000ebe335 --- /dev/null +++ b/evidence/fp8-k32768-20261018/receipt-fp8.json @@ -0,0 +1 @@ +{"test":"OMEGA_GPU_FP8_GEMV","points":[{"name":"one-hot conversion","rc":"OK","exact_rows":256,"of":256},{"name":"k256 n128","experts":1,"n":128,"k":256,"groups":1,"x_rows":1,"rc":"OK","bad":0,"worst_rel":3.713e-08,"second_call_identical":1,"variant":1,"grid_x":16,"grid_y":1,"lane_bytes":8,"rows_per_warp":1,"warps_per_cta":8,"depth":1,"bytes":32776,"upload_ms":0.10,"chip_median_ns":16816,"gbps_chip":1.95,"call_median_ns":22848,"gbps_call":1.43,"reps":20,"marker":1145324612,"evict":1},{"name":"k768 n256","experts":1,"n":256,"k":768,"groups":1,"x_rows":1,"rc":"OK","bad":0,"worst_rel":2.681e-08,"second_call_identical":1,"variant":1,"grid_x":32,"grid_y":1,"lane_bytes":8,"rows_per_warp":1,"warps_per_cta":8,"depth":3,"bytes":196656,"upload_ms":0.28,"chip_median_ns":21072,"gbps_chip":9.33,"call_median_ns":30144,"gbps_call":6.52,"reps":20,"marker":1145324612,"evict":1},{"name":"k2048 n384","experts":1,"n":384,"k":2048,"groups":1,"x_rows":1,"rc":"OK","bad":0,"worst_rel":2.689e-08,"second_call_identical":1,"variant":1,"grid_x":48,"grid_y":1,"lane_bytes":16,"rows_per_warp":1,"warps_per_cta":8,"depth":4,"bytes":786624,"upload_ms":0.58,"chip_median_ns":25264,"gbps_chip":31.14,"call_median_ns":40256,"gbps_call":19.54,"reps":20,"marker":1145324612,"evict":1},{"name":"gate 768x2048","experts":1,"n":768,"k":2048,"groups":1,"x_rows":1,"rc":"OK","bad":0,"worst_rel":3.011e-08,"second_call_identical":1,"variant":1,"grid_x":96,"grid_y":1,"lane_bytes":16,"rows_per_warp":1,"warps_per_cta":8,"depth":4,"bytes":1573248,"upload_ms":0.86,"chip_median_ns":24496,"gbps_chip":64.22,"call_median_ns":40335,"gbps_call":39.00,"reps":20,"marker":1145324612,"evict":1},{"name":"gate+up 1536x2048","experts":1,"n":1536,"k":2048,"groups":1,"x_rows":1,"rc":"OK","bad":0,"worst_rel":2.434e-08,"second_call_identical":1,"variant":1,"grid_x":192,"grid_y":1,"lane_bytes":16,"rows_per_warp":1,"warps_per_cta":8,"depth":4,"bytes":3146496,"upload_ms":1.56,"chip_median_ns":33568,"gbps_chip":93.73,"call_median_ns":49568,"gbps_call":63.48,"reps":20,"marker":1145324612,"evict":1},{"name":"gate+up 1536x2048 mutant 1","caught":1,"rc":"OK","bad":1536,"worst_rel":2.507e-01},{"name":"gate+up 1536x2048 mutant 2","caught":1,"rc":"OK","bad":1535,"worst_rel":1.913e-01},{"name":"gate+up 1536x2048 mutant 4","caught":1,"rc":"OK","bad":1536,"worst_rel":2.507e-01},{"name":"down 2048x768","experts":1,"n":2048,"k":768,"groups":1,"x_rows":1,"rc":"OK","bad":0,"worst_rel":4.271e-08,"second_call_identical":1,"variant":1,"grid_x":256,"grid_y":1,"lane_bytes":8,"rows_per_warp":1,"warps_per_cta":8,"depth":3,"bytes":1573248,"upload_ms":0.86,"chip_median_ns":40175,"gbps_chip":39.16,"call_median_ns":50912,"gbps_call":30.90,"reps":20,"marker":1145324612,"evict":1},{"name":"q_proj 4096x2048","experts":1,"n":4096,"k":2048,"groups":1,"x_rows":1,"rc":"OK","bad":0,"worst_rel":2.705e-08,"second_call_identical":1,"variant":1,"grid_x":256,"grid_y":1,"lane_bytes":16,"rows_per_warp":1,"warps_per_cta":8,"depth":0,"bytes":8390656,"upload_ms":3.61,"chip_median_ns":59199,"gbps_chip":141.74,"call_median_ns":63167,"gbps_call":132.83,"reps":20,"marker":1145324612,"evict":1},{"name":"k_proj 512x2048","experts":1,"n":512,"k":2048,"groups":1,"x_rows":1,"rc":"OK","bad":0,"worst_rel":2.309e-08,"second_call_identical":1,"variant":1,"grid_x":64,"grid_y":1,"lane_bytes":16,"rows_per_warp":1,"warps_per_cta":8,"depth":4,"bytes":1048832,"upload_ms":0.60,"chip_median_ns":21632,"gbps_chip":48.49,"call_median_ns":36752,"gbps_call":28.54,"reps":20,"marker":1145324612,"evict":1},{"name":"o_proj 2048x4096","experts":1,"n":2048,"k":4096,"groups":1,"x_rows":1,"rc":"OK","bad":0,"worst_rel":2.168e-08,"second_call_identical":1,"variant":1,"grid_x":256,"grid_y":1,"lane_bytes":16,"rows_per_warp":1,"warps_per_cta":8,"depth":0,"bytes":8390656,"upload_ms":4.31,"chip_median_ns":68752,"gbps_chip":122.04,"call_median_ns":71696,"gbps_call":117.03,"reps":20,"marker":1145324612,"evict":1},{"name":"qkv fused 5120x2048","experts":1,"n":5120,"k":2048,"groups":1,"x_rows":1,"rc":"OK","bad":0,"worst_rel":3.281e-08,"second_call_identical":1,"variant":1,"grid_x":256,"grid_y":1,"lane_bytes":16,"rows_per_warp":1,"warps_per_cta":8,"depth":0,"bytes":10488320,"upload_ms":4.93,"chip_median_ns":90272,"gbps_chip":116.19,"call_median_ns":94688,"gbps_call":110.77,"reps":20,"marker":1145324612,"evict":1},{"name":"8 experts gate+up shared x","experts":8,"n":1536,"k":2048,"groups":8,"x_rows":1,"rc":"OK","bad":0,"worst_rel":3.010e-08,"second_call_identical":1,"variant":1,"grid_x":6,"grid_y":8,"lane_bytes":16,"rows_per_warp":1,"warps_per_cta":32,"depth":0,"bytes":25171968,"upload_ms":11.37,"chip_median_ns":164094,"gbps_chip":153.40,"call_median_ns":172206,"gbps_call":146.17,"reps":20,"marker":1145324612,"evict":1},{"name":"8 experts gate+up shared x mutant 1","caught":1,"rc":"OK","bad":12288,"worst_rel":2.601e-01},{"name":"8 experts gate+up shared x mutant 2","caught":1,"rc":"OK","bad":12287,"worst_rel":2.790e-01},{"name":"8 experts gate+up shared x mutant 3","caught":1,"rc":"OK","bad":12288,"worst_rel":4.290e-01},{"name":"8 experts gate+up shared x mutant 4","caught":1,"rc":"OK","bad":12288,"worst_rel":2.601e-01},{"name":"8 experts down per-group x","experts":8,"n":2048,"k":768,"groups":8,"x_rows":8,"rc":"OK","bad":0,"worst_rel":4.885e-08,"second_call_identical":1,"variant":1,"grid_x":6,"grid_y":8,"lane_bytes":8,"rows_per_warp":1,"warps_per_cta":32,"depth":0,"bytes":12585984,"upload_ms":5.34,"chip_median_ns":89807,"gbps_chip":140.14,"call_median_ns":101535,"gbps_call":123.96,"reps":20,"marker":1145324612,"evict":1},{"name":"8 of 16 experts gate+up","experts":16,"n":1536,"k":2048,"groups":8,"x_rows":1,"rc":"OK","bad":0,"worst_rel":3.255e-08,"second_call_identical":1,"variant":1,"grid_x":6,"grid_y":8,"lane_bytes":16,"rows_per_warp":1,"warps_per_cta":32,"depth":0,"bytes":25171968,"upload_ms":22.37,"chip_median_ns":148575,"gbps_chip":169.42,"call_median_ns":156911,"gbps_call":160.42,"reps":20,"marker":1145324612,"evict":1},{"name":"large 16384x2048","experts":1,"n":16384,"k":2048,"groups":1,"x_rows":1,"rc":"OK","bad":0,"worst_rel":3.250e-08,"second_call_identical":1,"variant":1,"grid_x":256,"grid_y":1,"lane_bytes":16,"rows_per_warp":1,"warps_per_cta":8,"depth":0,"bytes":33562624,"upload_ms":15.26,"chip_median_ns":198223,"gbps_chip":169.32,"call_median_ns":208926,"gbps_call":160.64,"reps":20,"marker":1145324612,"evict":1},{"name":"q38 gate 17408x5120","experts":1,"n":17408,"k":5120,"groups":1,"x_rows":1,"rc":"OK","bad":0,"worst_rel":2.265e-08,"second_call_identical":1,"variant":1,"grid_x":256,"grid_y":1,"lane_bytes":16,"rows_per_warp":1,"warps_per_cta":8,"depth":0,"bytes":89150720,"upload_ms":37.63,"chip_median_ns":469980,"gbps_chip":189.69,"call_median_ns":482204,"gbps_call":184.88,"reps":20,"marker":1145324612,"evict":1},{"name":"q38 down 5120x17408","experts":1,"n":5120,"k":17408,"groups":1,"x_rows":1,"rc":"OK","bad":0,"worst_rel":1.367e-08,"second_call_identical":1,"variant":1,"grid_x":256,"grid_y":1,"lane_bytes":16,"rows_per_warp":1,"warps_per_cta":8,"depth":0,"bytes":89150720,"upload_ms":39.67,"chip_median_ns":497804,"gbps_chip":179.09,"call_median_ns":505868,"gbps_call":176.23,"reps":20,"marker":1145324612,"evict":1},{"name":"q38 q_proj 12288x5120","experts":1,"n":12288,"k":5120,"groups":1,"x_rows":1,"rc":"OK","bad":0,"worst_rel":2.324e-08,"second_call_identical":1,"variant":1,"grid_x":256,"grid_y":1,"lane_bytes":16,"rows_per_warp":1,"warps_per_cta":8,"depth":0,"bytes":62929920,"upload_ms":27.43,"chip_median_ns":347821,"gbps_chip":180.93,"call_median_ns":357229,"gbps_call":176.16,"reps":20,"marker":1145324612,"evict":1},{"name":"q38 k_proj 1024x5120","experts":1,"n":1024,"k":5120,"groups":1,"x_rows":1,"rc":"OK","bad":0,"worst_rel":2.100e-08,"second_call_identical":1,"variant":1,"grid_x":128,"grid_y":1,"lane_bytes":16,"rows_per_warp":1,"warps_per_cta":8,"depth":0,"bytes":5244160,"upload_ms":2.49,"chip_median_ns":56335,"gbps_chip":93.09,"call_median_ns":59103,"gbps_call":88.73,"reps":20,"marker":1145324612,"evict":1},{"name":"q38 in_proj_qkv 10240x5120","experts":1,"n":10240,"k":5120,"groups":1,"x_rows":1,"rc":"OK","bad":0,"worst_rel":2.163e-08,"second_call_identical":1,"variant":1,"grid_x":256,"grid_y":1,"lane_bytes":16,"rows_per_warp":1,"warps_per_cta":8,"depth":0,"bytes":52441600,"upload_ms":22.57,"chip_median_ns":291534,"gbps_chip":179.88,"call_median_ns":299566,"gbps_call":175.06,"reps":20,"marker":1145324612,"evict":1},{"name":"q38 in_proj_z 6144x5120","experts":1,"n":6144,"k":5120,"groups":1,"x_rows":1,"rc":"OK","bad":0,"worst_rel":2.183e-08,"second_call_identical":1,"variant":1,"grid_x":256,"grid_y":1,"lane_bytes":16,"rows_per_warp":1,"warps_per_cta":8,"depth":0,"bytes":31464960,"upload_ms":14.22,"chip_median_ns":231518,"gbps_chip":135.91,"call_median_ns":237054,"gbps_call":132.73,"reps":20,"marker":1145324612,"evict":1},{"name":"q38 out_proj 5120x6144","experts":1,"n":5120,"k":6144,"groups":1,"x_rows":1,"rc":"OK","bad":0,"worst_rel":1.806e-08,"second_call_identical":1,"variant":1,"grid_x":256,"grid_y":1,"lane_bytes":16,"rows_per_warp":1,"warps_per_cta":8,"depth":0,"bytes":31464960,"upload_ms":14.22,"chip_median_ns":160991,"gbps_chip":195.45,"call_median_ns":166463,"gbps_call":189.02,"reps":20,"marker":1145324612,"evict":1},{"name":"width cap 256x32768","experts":1,"n":256,"k":32768,"groups":1,"x_rows":1,"rc":"OK","bad":0,"worst_rel":1.208e-08,"second_call_identical":1,"variant":1,"grid_x":32,"grid_y":1,"lane_bytes":16,"rows_per_warp":1,"warps_per_cta":8,"depth":0,"bytes":8390656,"upload_ms":3.54,"chip_median_ns":153967,"gbps_chip":54.50,"call_median_ns":163215,"gbps_call":51.41,"reps":20,"marker":1145324612,"evict":1}],"checks":30,"failed":0,"device_opens":1,"verdict":"OMEGA_GPU_FP8_GEMV_PASS"} diff --git a/evidence/fp8-k32768-20261018/receipt-tc-q38down.json b/evidence/fp8-k32768-20261018/receipt-tc-q38down.json new file mode 100644 index 000000000..4886bded2 --- /dev/null +++ b/evidence/fp8-k32768-20261018/receipt-tc-q38down.json @@ -0,0 +1 @@ +{"shape":"q38down","tokens":1024,"rows":1024,"tiles":16,"reps":9,"chip_median_ns":13111153,"call_median_ns":32698961,"tflops":13.922,"streamed_bytes":1426063360,"act_bytes":1426063360,"fail":0} diff --git a/evidence/fp8-k32768-20261018/tc-host.log b/evidence/fp8-k32768-20261018/tc-host.log new file mode 100644 index 000000000..d109f87cc --- /dev/null +++ b/evidence/fp8-k32768-20261018/tc-host.log @@ -0,0 +1,14 @@ +placeholder patch self-test: ok (SHFL.BFLY x2, SHFL.DOWN x1, F2FP.BF16.F32.PACK_AB x1 match the oracle bits) +shape k 2048 rt 4 ct 2 warps 8: rc 0, 539 instructions, peak 124, declared 128, shared 16384, span 128: ok +shape k 768 rt 4 ct 2 warps 8: rc 0, 539 instructions, peak 124, declared 128, shared 16384, span 128: ok +shape k 4096 rt 4 ct 2 warps 8: rc 0, 539 instructions, peak 124, declared 128, shared 16384, span 128: ok +shape k 2048 rt 4 ct 1 warps 8: rc 0, 392 instructions, peak 88, declared 96, shared 16384, span 64: ok +shape k 2048 rt 2 ct 2 warps 4: rc 0, 411 instructions, peak 96, declared 104, shared 8192, span 64: ok +shape k 2048 rt 4 ct 2 warps 4: rc -1, 0 instructions, peak 0, declared 8, shared 16384, span 64: REFUSED +shape k 768 rt 4 ct 2 warps 4: rc -1, 0 instructions, peak 0, declared 8, shared 16384, span 64: REFUSED +shape k 5120 rt 4 ct 2 warps 8: rc 0, 539 instructions, peak 124, declared 128, shared 16384, span 128: ok +shape k 17408 rt 4 ct 2 warps 8: rc 0, 539 instructions, peak 124, declared 128, shared 16384, span 128: ok +shape k 32768 rt 4 ct 2 warps 8: rc 0, 539 instructions, peak 124, declared 128, shared 16384, span 128: ok +emulation vs double oracle: worst |err| / sum|terms| = 2.46e-07 (ok, bound 1e-6) +host-only: PASS +GPU_TCGEMM: PASS diff --git a/evidence/fp8-k32768-20261018/tc-sim.log b/evidence/fp8-k32768-20261018/tc-sim.log new file mode 100644 index 000000000..0f990fe4c --- /dev/null +++ b/evidence/fp8-k32768-20261018/tc-sim.log @@ -0,0 +1,20 @@ +sim E 3 n 256 k 256 M 40 rt 4 ct 2 warps 8 order 0: ok 0 of 10240 differ from the emulation, 0 unwritten (bit-identical) +sim E 3 n 256 k 256 M 40 rt 4 ct 2 warps 8 order 1: ok 0 of 10240 differ from the emulation, 0 unwritten (bit-identical) +sim E 2 n 128 k 384 M 70 rt 4 ct 2 warps 8 order 0: ok 0 of 8960 differ from the emulation, 0 unwritten (bit-identical) +sim E 2 n 128 k 384 M 70 rt 4 ct 2 warps 8 order 1: ok 0 of 8960 differ from the emulation, 0 unwritten (bit-identical) +sim E 4 n 128 k 128 M 37 rt 2 ct 2 warps 4 order 0: ok 0 of 4736 differ from the emulation, 0 unwritten (bit-identical) +sim E 4 n 128 k 128 M 37 rt 2 ct 2 warps 4 order 1: ok 0 of 4736 differ from the emulation, 0 unwritten (bit-identical) +sim E 2 n 256 k 256 M 20 rt 4 ct 1 warps 8 order 0: ok 0 of 5120 differ from the emulation, 0 unwritten (bit-identical) +sim E 2 n 256 k 256 M 20 rt 4 ct 1 warps 8 order 1: ok 0 of 5120 differ from the emulation, 0 unwritten (bit-identical) +sim E 2 n 128 k 256 M 33 rt 1 ct 4 warps 4 order 0: ok 0 of 4224 differ from the emulation, 0 unwritten (bit-identical) +sim E 2 n 128 k 256 M 33 rt 1 ct 4 warps 4 order 1: ok 0 of 4224 differ from the emulation, 0 unwritten (bit-identical) +sim E 1 n 512 k 256 M 64 rt 4 ct 2 warps 8 order 0: ok 0 of 32768 differ from the emulation, 0 unwritten (bit-identical) +sim E 1 n 512 k 256 M 64 rt 4 ct 2 warps 8 order 1: ok 0 of 32768 differ from the emulation, 0 unwritten (bit-identical) +sim E 1 n 128 k 17408 M 64 rt 4 ct 2 warps 8 order 0: ok 0 of 8192 differ from the emulation, 0 unwritten (bit-identical) +sim E 1 n 128 k 17408 M 64 rt 4 ct 2 warps 8 order 1: ok 0 of 8192 differ from the emulation, 0 unwritten (bit-identical) +sim mutant 1: caught (6400 of 6400 differ) +sim mutant 2: caught (6400 of 6400 differ) +sim mutant 3: caught (6144 of 6400 differ) +sim mutant 4: caught (6400 of 6400 differ) +sim: PASS +GPU_TCGEMM: PASS diff --git a/src/omega_blackwell_codegen_moe.h b/src/omega_blackwell_codegen_moe.h index 4140f2fc7..97bdcbff8 100644 --- a/src/omega_blackwell_codegen_moe.h +++ b/src/omega_blackwell_codegen_moe.h @@ -59,7 +59,7 @@ extern "C" { #define OMEGA_FP8_X_EXP 64 /* x' = x * 2^64 (host, exact) */ #define OMEGA_FP8_SCALE_EXP 56 /* S' = S * 2^56 (host, exact for every finite bf16 scale below 2^72) */ #define OMEGA_FP8_BLOCK 128u /* scale block (rows and columns) */ -#define OMEGA_FP8_MAX_K 16384u +#define OMEGA_FP8_MAX_K 32768u /* the step kernel and the tensor-core kernel loop over k; 17408 is the Qwen3.8-27B down_proj (omega#541) */ #define OMEGA_FP8_MAX_GROUPS 64u /* group table entries per launch buffer (8 experts today) */ /* argument word offsets */ diff --git a/src/omega_blackwell_codegen_tc.c b/src/omega_blackwell_codegen_tc.c index 1b7f55dfd..6b5f14f9b 100644 --- a/src/omega_blackwell_codegen_tc.c +++ b/src/omega_blackwell_codegen_tc.c @@ -40,7 +40,7 @@ int omega_blackwell_codegen_tc_probe_prog(int mutant, BlackwellIRProgram *prog) int omega_tcgemm_spec_ok(const OmegaTcGemmSpec *s) { if (!s) return 0; - if (s->k < 128u || s->k > 16384u || s->k % 128u) return 0; + if (s->k < 128u || s->k > OMEGA_TCGEMM_MAX_K || s->k % 128u) return 0; if (s->rt != 1 && s->rt != 2 && s->rt != 4) return 0; if (s->ct != 1 && s->ct != 2 && s->ct != 4) return 0; if (s->rt * s->ct < 4u) return 0; /* >= 4 independent HMMAs between dependent ones (8 cycles each, nvcc's 29-cycle rule) */ diff --git a/src/omega_blackwell_codegen_tc.h b/src/omega_blackwell_codegen_tc.h index cc5c8e563..b1374ef58 100644 --- a/src/omega_blackwell_codegen_tc.h +++ b/src/omega_blackwell_codegen_tc.h @@ -48,8 +48,9 @@ int omega_blackwell_codegen_tc_probe_prog(int mutant, BlackwellIRProgram *prog); * Grid: grid_x = n / (warps * 8 * ct) (exact), grid_y = tiles. CTA: 32 * warps threads; shared 2 * 16 * rt * 128 bytes. * mutant (tests only): 1 drops the block scale, 2 never advances the scale pointer, 3 row tile i reads tile i^1 (rt >= 2), * 4 drops the last 64-element chunk of every 128 block. Each must be caught. */ +#define OMEGA_TCGEMM_MAX_K 32768u /* the K loop runs KB = k / 128 iterations; nothing else grows with k (omega#541) */ typedef struct { - uint32_t k; /* multiple of 128, 128 .. 16384 */ + uint32_t k; /* multiple of 128, 128 .. OMEGA_TCGEMM_MAX_K */ uint32_t rt; /* row tiles (16 rows) per CTA: 1, 2 or 4 */ uint32_t ct; /* column tiles (8 weight rows) per warp: 1, 2 or 4; rt * ct >= 4 */ uint32_t warps; /* 1, 2, 4 or 8; (16 * rt * 8) % (32 * warps) == 0 */ diff --git a/tests/gpu_fp8_api_test.c b/tests/gpu_fp8_api_test.c index bec0db1b9..bb9a9c1d6 100644 --- a/tests/gpu_fp8_api_test.c +++ b/tests/gpu_fp8_api_test.c @@ -156,7 +156,7 @@ static void host_only(void) { CHECK(o[0] == ldexpf(1.0f, 64) && o[1] == ldexpf(-2.0f, 64) && o[3] == 0.0f, "x fold exact"); } /* 3. codegen: every shape builds inside the budgets; refusals */ - static const uint32_t ks[] = { 128, 256, 768, 2048, 4096, 16384 }; + static const uint32_t ks[] = { 128, 256, 768, 2048, 4096, 16384, 17408, 32768 }; static const uint32_t lbs[] = { 8, 16 }, rows[] = { 1, 2, 4, 8 }; uint32_t worst_insns = 0, worst_gprs = 0; int built = 0; for (size_t a = 0; a < sizeof ks / sizeof ks[0]; a++) for (size_t b = 0; b < 2; b++) for (size_t c = 0; c < 4; c++) for (int m = 0; m <= 3; m++) for (int deep = 0; deep < 2; deep++) { @@ -175,7 +175,7 @@ static void host_only(void) { bad.k = 2048; bad.rows = 3; CHECK(omega_fp8_gemv_prog_stats(&bad, NULL, NULL) != 0, "rows 3 refused"); bad.rows = 8; bad.warps = 33; CHECK(omega_fp8_gemv_prog_stats(&bad, NULL, NULL) != 0, "warps 33 refused"); bad.warps = 8; bad.lane_bytes = 32; CHECK(omega_fp8_gemv_prog_stats(&bad, NULL, NULL) != 0, "lane_bytes 32 refused"); - bad.lane_bytes = 16; bad.k = 32768; CHECK(omega_fp8_gemv_prog_stats(&bad, NULL, NULL) != 0, "k past the limit refused"); } + bad.lane_bytes = 16; bad.k = OMEGA_FP8_MAX_K + 512u; CHECK(omega_fp8_gemv_prog_stats(&bad, NULL, NULL) != 0, "k past the limit refused"); } /* Register file (chip-found 2026-10-13): 32 * warps * declared registers must be <= 65536; the API refuses the launch. * The deep k=2048 kernel at 32 warps (72 declared x 1024 threads = 73728) faulted on the chip with Xid 13. */ { OmegaFp8GemvSpec deep = { .k = 2048, .lane_bytes = 16, .rows = 1, .warps = 32, .depth = 4 }; uint32_t gp = 0; @@ -192,7 +192,7 @@ static void host_only(void) { { OmegaGpuFp8Tensor *t = NULL; uint8_t w[128 * 128]; uint16_t s[1] = { bf16_of(1.0f) }; memset(w, 0x38, sizeof w); CHECK(omega_gpu_fp8_tensor_upload(1, 128, 128, NULL, s, &t) == OMEGA_GPU_FP8_BAD_ARGS, "NULL w refused"); CHECK(omega_gpu_fp8_tensor_upload(1, 100, 128, w, s, &t) == OMEGA_GPU_FP8_BAD_ARGS, "n not a multiple of 128 refused"); - CHECK(omega_gpu_fp8_tensor_upload(1, 128, 32768, w, s, &t) == OMEGA_GPU_FP8_TOO_LARGE, "k past the limit refused"); + CHECK(omega_gpu_fp8_tensor_upload(1, 128, OMEGA_FP8_MAX_K + 256u, w, s, &t) == OMEGA_GPU_FP8_TOO_LARGE, "k past the limit refused"); w[77] = 0xff; CHECK(omega_gpu_fp8_tensor_upload(1, 128, 128, w, s, &t) == OMEGA_GPU_FP8_NAN_WEIGHT && t == NULL, "NaN weight refused before any device work"); CHECK(strstr(omega_gpu_fp8_last_error(), "byte 77") != NULL, "error names the byte (%s)", omega_gpu_fp8_last_error()); float y[8]; CHECK(omega_gpu_fp8_gemv_f32(NULL, 0, y, y, NULL) == OMEGA_GPU_FP8_BAD_ARGS, "NULL tensor refused"); } @@ -336,6 +336,7 @@ static void sim_battery(uint32_t cta_budget) { { 6, 256, 768, 8, 8, 8, 4, 8, "8 groups per-group x, repeated ids (down)" }, { 3, 128, 256, 2, 2, 8, 8, 4, "2 groups per-group x" }, { 2, 256, 768, 2, 2, 8, 1, 7, "k768 w7: partial staging round (deep)" }, + { 1, 128, 17408, 1, 1, 16, 2, 8, "k17408 lb16 r2 w8 (Qwen3.8-27B down width, step kernel)" }, }; const size_t npts = sizeof pts / sizeof pts[0]; double worst_all = 0.0; @@ -469,6 +470,15 @@ static int chip_run(const char *out_path, uint32_t reps) { { 8, 2048, 768, 8, 8, "8 experts down per-group x", 1 }, { 16, 1536, 2048, 8, 1, "8 of 16 experts gate+up", 1 }, { 1, 16384, 2048, 1, 1, "large 16384x2048", 1 }, + /* Qwen3.8-27B dense shapes (omega#541) and the new width cap */ + { 1, 17408, 5120, 1, 1, "q38 gate 17408x5120", 1 }, + { 1, 5120, 17408, 1, 1, "q38 down 5120x17408", 1 }, + { 1, 12288, 5120, 1, 1, "q38 q_proj 12288x5120", 1 }, + { 1, 1024, 5120, 1, 1, "q38 k_proj 1024x5120", 1 }, + { 1, 10240, 5120, 1, 1, "q38 in_proj_qkv 10240x5120", 1 }, + { 1, 6144, 5120, 1, 1, "q38 in_proj_z 6144x5120", 1 }, + { 1, 5120, 6144, 1, 1, "q38 out_proj 5120x6144", 1 }, + { 1, 256, 32768, 1, 1, "width cap 256x32768", 1 }, }; /* 0. one-hot conversion on the chip: row r holds code r at column 0 (NaN codes as 0x00), x = e_0, scale 1. * y[r] must equal the reference bit for bit. The e4m3 subnormal codes 0x01..0x07 (and negatives) travel diff --git a/tests/gpu_tcgemm_test.c b/tests/gpu_tcgemm_test.c index aaddd094d..dfc43adc5 100644 --- a/tests/gpu_tcgemm_test.c +++ b/tests/gpu_tcgemm_test.c @@ -112,6 +112,7 @@ static int host_only(void) { /* production shapes: instructions and registers (declared = peak + 2 rounded to 8 <= 128; 32 * warps * declared <= 65536) */ static const OmegaTcGemmSpec shapes[] = { { 2048, 4, 2, 8, 0 }, { 768, 4, 2, 8, 0 }, { 4096, 4, 2, 8, 0 }, { 2048, 4, 1, 8, 0 }, { 2048, 2, 2, 4, 0 }, { 2048, 4, 2, 4, 0 }, { 768, 4, 2, 4, 0 }, + { 5120, 4, 2, 8, 0 }, { 17408, 4, 2, 8, 0 }, { 32768, 4, 2, 8, 0 }, /* Qwen3.8-27B widths and the new cap (omega#541) */ }; static BlackwellIRProgram prog; for (size_t i = 0; i < sizeof shapes / sizeof shapes[0]; i++) { @@ -181,6 +182,7 @@ static int sim_tests(void) { { 2, 256, 256, 20, 7, 0, { 256, 4, 1, 8, 0 } }, { 2, 128, 256, 33, 5, 1, { 256, 1, 4, 4, 0 } }, { 1, 512, 256, 64, 64, 0, { 256, 4, 2, 8, 0 } }, /* dense: one expert, four CTAs across n */ + { 1, 128, 17408, 64, 64, 0, { 17408, 4, 2, 8, 0 } }, /* Qwen3.8-27B down width (omega#541) */ }; for (size_t i = 0; i < sizeof pts / sizeof pts[0]; i++) { Prob p; prob_make(&p, pts[i].E, pts[i].n, pts[i].k, pts[i].M, pts[i].xr, pts[i].skew); @@ -271,6 +273,9 @@ int chip_tests(int argc, char **argv) { uint32_t E, n, k; if (!strcmp(shape, "gateup")) { E = 128; n = 1536; k = 2048; } else if (!strcmp(shape, "down")) { E = 128; n = 2048; k = 768; } else if (!strcmp(shape, "qkv")) { E = 1; n = 5120; k = 2048; } else if (!strcmp(shape, "o")) { E = 1; n = 2048; k = 4096; } + /* Qwen3.8-27B dense shapes (omega#541): MLP gate or up, down (k 17408), DeltaNet in_proj_qkv, out_proj / o_proj */ + else if (!strcmp(shape, "q38gate")) { E = 1; n = 17408; k = 5120; } else if (!strcmp(shape, "q38down")) { E = 1; n = 5120; k = 17408; } + else if (!strcmp(shape, "q38qkv")) { E = 1; n = 10240; k = 5120; } else if (!strcmp(shape, "q38o")) { E = 1; n = 5120; k = 6144; } else { printf("unknown shape %s\n", shape); return 1; } const uint32_t M = E == 1 ? tokens : tokens * 8u; if (reps > 64) reps = 64; From 4d19cf74586a2b49af9500e22c74d5b7255bc484 Mon Sep 17 00:00:00 2001 From: Drake Stapleton Date: Sun, 18 Oct 2026 08:00:39 -0500 Subject: [PATCH 2/2] crumb compile (tool d0f0b95d) Co-Authored-By: Claude Opus 5.5 --- .crumb | 24 ++++++++++++------------ src/.crumb | 8 ++++---- tests/.crumb | 8 ++++---- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.crumb b/.crumb index 81f377ee2..0515cfb33 100644 --- a/.crumb +++ b/.crumb @@ -77,14 +77,14 @@ "purpose": "Directory spec. Purpose not yet described by a human." }, { - "digest": "dfa36de2ac8649f66f80587abea51a7f166285ee0b92e0e09774c98689055250", - "last_commit": "333091a6", + "digest": "6b312b059d32e139860f43274d3f55c89b0bd4c4a9312c4b7a4a6ee547f2cba4", + "last_commit": "b780c44f", "name": "src", "purpose": "Directory src. Purpose not yet described by a human." }, { - "digest": "4eb9d4d76234448c0ed691f0aeb9c90d785f8a47b1b1291d728bbe3e1509dc10", - "last_commit": "88e24bdd", + "digest": "32f02d86a0c90452d749601c2f855c0dd39ed8c22eacb0db3255692bf4327c52", + "last_commit": "b780c44f", "name": "tests", "purpose": "Directory tests. Purpose not yet described by a human." }, @@ -95,15 +95,15 @@ "purpose": "Directory tools. Purpose not yet described by a human." } ], - "children_root": "sha256:e1a8c008214ad5dbc33a3e184d7e882dc56d1d50f9bd14c58f8773992961557e", - "compiled_at": "2026-10-16T19:04:20Z", + "children_root": "sha256:c1d6009835a6d4cc67b9fbe36bea47a5474805d89bc0ea0c0bc80986e37a4b33", + "compiled_at": "2026-10-18T13:00:33Z", "compiler": "crumb-compile/1", - "digest": "sha256:32086cfe6b319e0c0229bec39553d1b32f7460aa660ad888d5eb5990522e705a", - "evidence_files": 11127, - "evidence_root": "sha256:4528085ec1661c442b64fb5dc8def65067ea2620ff88e42bcf52d58b7642ea6e", - "files": 14109, - "generated_at_commit": "88e24bdd57b27817d030d0ad95f62c3f3eacf426", - "source_tree": "sha256:e01c9caa38757306582443fe69f52cb061c3d27250f8ad0b9f4b4f43b009dc14" + "digest": "sha256:426010da0bda17bf2235d7023a7861fe7e78c41dd088409e9ce5d056f5038b48", + "evidence_files": 11141, + "evidence_root": "sha256:34503f03c3e7022c56231d8905a232333ec8a32fd98b9d2f20082c0104de6a70", + "files": 14123, + "generated_at_commit": "b780c44f1c9b104583a98be43233ad8157c5def1", + "source_tree": "sha256:d3cc577e42918fa42d8ee865dcc966c319f6b0147b928045863025a9d7d5df11" }, "owner_lane": "", "provenance": { diff --git a/src/.crumb b/src/.crumb index 4fe5298a4..5fd5605fa 100644 --- a/src/.crumb +++ b/src/.crumb @@ -182,14 +182,14 @@ } ], "children_root": "sha256:15012a017b26a269feb256b64875ece2912f5f82c57804baafa3777c4fcb80b9", - "compiled_at": "2026-10-16T07:33:43Z", + "compiled_at": "2026-10-18T13:00:33Z", "compiler": "crumb-compile/1", - "digest": "sha256:dfa36de2ac8649f66f80587abea51a7f166285ee0b92e0e09774c98689055250", + "digest": "sha256:6b312b059d32e139860f43274d3f55c89b0bd4c4a9312c4b7a4a6ee547f2cba4", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "files": 537, - "generated_at_commit": "1d481ab853a14d3c11eff926ce1e25993085f76a", - "source_tree": "sha256:200c9243151691313acb5f86d3e9cb3058f1a1b92ece2a255b3340b691dfb894" + "generated_at_commit": "b780c44f1c9b104583a98be43233ad8157c5def1", + "source_tree": "sha256:508de26b90ff66506508e764a8c20c92e0a217af2c94a1f40942e34b3ffe1b3f" }, "owner_lane": "", "provenance": { diff --git a/tests/.crumb b/tests/.crumb index bd5535a8b..d13c4819b 100644 --- a/tests/.crumb +++ b/tests/.crumb @@ -296,14 +296,14 @@ } ], "children_root": "sha256:ddc3618190458bc5073e3bee67ffccc68a2ee9f065f2cb0d86545386a29fddf8", - "compiled_at": "2026-10-16T19:04:20Z", + "compiled_at": "2026-10-18T13:00:33Z", "compiler": "crumb-compile/1", - "digest": "sha256:4eb9d4d76234448c0ed691f0aeb9c90d785f8a47b1b1291d728bbe3e1509dc10", + "digest": "sha256:32f02d86a0c90452d749601c2f855c0dd39ed8c22eacb0db3255692bf4327c52", "evidence_files": 16, "evidence_root": "sha256:96d08097822ad95f4e562c19e0ba5df5a035774c48632f1832912c40a27bd27a", "files": 1270, - "generated_at_commit": "88e24bdd57b27817d030d0ad95f62c3f3eacf426", - "source_tree": "sha256:e6c4f0021d383ba2e59da0d85d06a0b98170f6d188289c891b5745200548e6fc" + "generated_at_commit": "b780c44f1c9b104583a98be43233ad8157c5def1", + "source_tree": "sha256:abbdc788504677fa02405127a7dced7a2bf903c19e2be10c77486bc5a22a2e87" }, "owner_lane": "", "provenance": {