interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / evidence / q38-decode-speed-chip-20261019T0316Z / worktree.diff

28 lines · 1904 bytes Raw Blame History
1diff --git a/src/omega_gpu_fp8_api.c b/src/omega_gpu_fp8_api.c
2index 55614efe..b3fe85bd 100644
3--- a/src/omega_gpu_fp8_api.c
4+++ b/src/omega_gpu_fp8_api.c
5@@ -383,6 +383,11 @@ static int gemv_core(const OmegaGpuFp8Tensor *t, uint32_t groups, const uint32_t
6 uint32_t grid_x = (RG + spec.warps - 1) / spec.warps;
7 const int variant = variant_now();
8 uint32_t budget = g.cta_budget_set ? g.cta_budget : (groups > 1u ? (variant == 2 ? OMEGA_GPU_FP8_V2_GROUPED_CTAS : OMEGA_GPU_FP8_GROUPED_CTAS) : OMEGA_GPU_FP8_MAX_CTAS);
9+ /* big-k grid (qwen38/decode-speed): up to OMEGA_GPU_FP8_BIGK_CTAS CTAs, split so every warp gets the same number of row
10+ * groups, at least two (measured, runs/sweep5 and sweep7: budget 384 over 256 gave mix +3%, gate_up +2.6%; the n = 5120
11+ * shapes run best at 160 CTAs, two row groups per warp: o_proj 186 -> 198 GB/s) */
12+ const int bigk_grid = !g.cta_budget_set && groups == 1u && k > 4096u && omega_gpu_fp8_bigk();
13+ if (bigk_grid) { uint32_t waves = (grid_x + OMEGA_GPU_FP8_BIGK_CTAS - 1u) / OMEGA_GPU_FP8_BIGK_CTAS; if (waves < 2u) waves = 2u; grid_x = (grid_x + waves - 1u) / waves; budget = grid_x; }
14 if (grid_x > budget) grid_x = budget;
15 if (grid_x == 0) grid_x = 1;
16
17diff --git a/src/omega_gpu_fp8_api.h b/src/omega_gpu_fp8_api.h
18index 5d3819ae..25b17525 100644
19--- a/src/omega_gpu_fp8_api.h
20+++ b/src/omega_gpu_fp8_api.h
21@@ -67,6 +67,7 @@ enum {
22
23 #define OMEGA_GPU_FP8_MAX_GROUPS 64u
24 #define OMEGA_GPU_FP8_MAX_CTAS 256u /* default CTA budget per group for a single projection; the elementwise and attention rows paths proved 1024 */
25+#define OMEGA_GPU_FP8_BIGK_CTAS 384u /* big-k rule: CTA budget of a single projection with k > 4096 (Qwen3.8-27B), split evenly (2026-10-19) */
26 #define OMEGA_GPU_FP8_GROUPED_CTAS 6u /* CTAs per group for a grouped launch (32 warps each): measured best for 8 experts */
27
28 typedef struct {