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 / om / gpu / inkling2 / README.md

121 lines · 16581 bytes Raw Blame History Source

Inkling-2-Mini Seeded Omega SM121 Kernels & Native GB10 Decoder

This directory is 100% pure seeded Omega (.om) — zero Python, zero C, zero libc, and zero CUDA (libcuda.so.1 / nvcc / ptxas) anywhere. It contains:

The seeded compiler (seed/out/omc) compiles emit.om, emit_fast.om, native_run.om, and decoder/*.om with the repository's SM121 encoder (om/encoder/bw_enc_sm121.om) and native NVRM/UVM/GPFIFO/QMD units (gpu/nvidia/native/). seed/kflow/kpack.om packs each SASS image into an SM121 .cubin. lookup.om generates the shared 272-entry FP32 decode table (256 E4M3FN + 16 E2M1).

Zero-CUDA native GB10 runner (native_run.om → inkling2-native)

native_run.om compiles with seed/out/omc directly to a statically linked AArch64 ELF executable (ldd: not a dynamic executable). It embeds all 21 fast SM121 SASS kernels from emit_fast.om, opens /dev/nvidiactl, /dev/nvidia0, and /dev/nvidia-uvm directly through Omega's native Blackwell stack (gpu/nvidia/native/nvrm/context.om, gpu/nvidia/native/blackwell/{vector,launch,batch}.om), runs a 21/21 live-silicon numerical parity self-test, and replays a single-submit pre-recorded native GPFIFO QMD command buffer (one-time gbsetup + cb DMA, 1 nvsend doorbell kick for all 48 logical layers, 5 µs completion poll).

Real-weight end-to-end decoder + Live Arboris (decoder/ → inkling2-decode)

High-speed SM121 suite (emit_fast.om, kernels_fast.list)

emit_fast.om targets GB10's LPDDR5X memory bandwidth ceiling (236.9 GB/s measured STREAM / 273 GB/s nominal) with pipelined SM121 scoreboards, BSSY/BSYNC reconvergence, LDG.E.128/LDG.E.64, SMEM activation & LUT staging, warp SHFL.DOWN/SHFL.BFLY, Split-K bar0/bar2 overlapped Flash-Decoding, and single-submit native GPFIFO QMD replay:

Verified GB10 silicon performance (synthetic checkpoint-shaped weights, 3.3 GB across 4 banks > 135× L2, all 128 routed experts)

Single-submit native zero-CUDA receipt: /home/drakestapleton/yardsticks/receipts/2026-11-21-inkling2-native-single-submit.json (exclusive quiet Spark window 20261121T161149Z-27a2ce, exit: 0, nvrm_errors_delta: 0, 21/21 kernel parity PASS, static AArch64 ELF ldd: not a dynamic executable).

Configuration (48 logical layers, T_swa=1024, T_full=4096)Median latencyThroughputEffective DRAM BWSpeedup vs baseline
Baseline seeded Omega (2026-11-21-inkling2-speed-stress.json)384.55 ms/tok2.60 tok/s12.3 GB/s1.0×
Pure-Omega Single-Submit Native GPFIFO — ZERO CUDA (inkling2-native, 48L, no unembed, 4.72 GB/tok)25.17 ms/tok39.73 tok/s187.5 GB/s (79.2% of 236.9)15.3×
Pure-Omega Single-Submit Native GPFIFO — ZERO CUDA (inkling2-native, 48L + full 201k BF16 unembed, 5.65 GB/tok)29.25 ms/tok34.18 tok/s193.2 GB/s (81.5% of 236.9)—
Prior 4-submit Native GPFIFO (2026-11-21-inkling2-native-zero-cuda-final.json, no unembed)25.84 ms/tok38.69 tok/s182.6 GB/s (77.1% of 236.9)14.9×
Historical libcuda.so.1 Single-Submit CUDA Graph (2026-11-21-inkling2-fast-final.json, no unembed)24.30 ms/tok41.16 tok/s194.2 GB/s (82.0% of 236.9)15.8×

(Physical zero-overhead GB10 DRAM roofline at 236.9 GB/s: 19.92 ms/tok / 50.2 tok/s without unembed, 23.85 ms/tok / 41.9 tok/s with full 201k BF16 unembed.)

Multi-stream GB10 silicon throughput (inkling2-multistream, M = 1 → 4 → 8, ZERO CUDA)

Multi-stream receipt: /home/drakestapleton/yardsticks/receipts/2026-11-21-inkling2-multistream-clean-tail.json (exclusive quiet Spark window 20261121T212035Z-782324, exit: 0, nvrm_errors_delta: 0, static AArch64 ELFs ldd: not a dynamic executable, static 8-slot paged-KV + check-ms-server PASS, bf16_gemm_batch_fast / nvfp4_gemm_dedup_fast / mxfp8_gemm_dedup_fast B=8 live-silicon parity PASS with K=1152 tail guards, disjoint 64 MB K + 64 MB V slabs).

Configuration (48 logical layers, single-submit native GPFIFO, T_swa=1024, T_full=4096)Median stepAggregate throughputPer-streamScaling vs B=1
B = 1 (U = 8 unique experts, no unembed)33.32 ms30.01 tok/s30.01 tok/s1.00×
B = 4 (U = 16 unique experts, no unembed)57.54 ms69.51 tok/s17.38 tok/s2.32×
B = 8 (U = 24 unique experts, no unembed)90.35 ms88.54 tok/s11.07 tok/s2.95×
B = 1 (U = 8 unique experts + full 201k BF16 unembed)37.95 ms26.35 tok/s26.35 tok/s1.00×
B = 4 (U = 16 unique experts + full 201k BF16 unembed)61.62 ms64.91 tok/s16.23 tok/s2.46×
B = 8 (U = 24 unique experts + full 201k BF16 unembed)95.02 ms84.19 tok/s10.52 tok/s3.20×

Notice that sharing the 926 MB unembed [201024, 2304] weight matrix across all 8 streams adds only 4.67 ms total (90.35 ms -> 95.02 ms = 0.58 ms/stream).

Architecture coverage

Build and verify

From the repository root on AArch64 Linux after growing seed/out/omc:

sh seed/omega-from-seed.sh
sh om/gpu/inkling2/build.sh build/inkling2
build/inkling2/check-arboris
build/inkling2/check-ms-server

Inside an authorized Spark GB10 window:

spark-window run build/inkling2/inkling2-native                                               # 21/21 kernel parity + single-submit 48L GPFIFO (zero CUDA)
spark-window run build/inkling2/inkling2-decode ~/models/inkling-2-mini-ed40e7da "What is the capital of France? Answer in one sentence."
spark-window run build/inkling2/inkling2-serve --self-test                                    # live real-weight N=8 multi-stream continuous batcher (zero CUDA)
spark-window run build/inkling2/inkling2-multistream                                          # N=8 paged-KV + dedup MoE parity + B=1/4/8 GPFIFO (zero CUDA)

Launch contract

Each .cubin exports one symbol matching its file stem. kernels.list defines parameter order and sizes. All floating-point buffers are contiguous row-major FP32 (widen BF16 via bf16_unpack and round via bf16_pack at checkpoint boundaries). Four-byte packed loads require allocations rounded up to a 4-byte multiple. tiles(n) is ceil(n / 128).

KernelArguments in launch orderGrid · threads
nvfp4_quantin[N,16], lut[272], outer_scale[1], packed[N,8], scales[N], recon[N,16], N(tiles(N)) · 128
nvfp4_gemmA[M,K/2], W[N,K/2], sa[M,K/16], sw[N,K/16], alpha[1], lut[272], C[M,N], K, N(tiles(N),M) · 128
mxfp8_quantin[G,32], lut[272], packed[G,32], scales[G], recon[G,32](G) · 16
mxfp8_gemmA[M,K], W[N,K], sa[M,K/32], sw[ceil(N/32),K/32], lut[272], C[M,N], K, N(tiles(N),M) · 128
denseA[M,K], W[N,K], C[M,N], K, N(tiles(N),M) · 128
rms_statin[B,D], inv_rms[B], D(B) · 1
rms_applyin[B,D], gain[D], inv_rms[B], out[B,D], D(tiles(D),B) · 128
rms_unweightedin[B,D], inv_rms[B], out[B,D], D(tiles(D),B) · 128
l2_clipin[B,H,D], scale[H,D], tau[B], out[B,H,D], H, D, thresh_bits, flags(H,B) · 1
sconv_staticx[B,D], state[B,D,3], w[D,4], out[B,D], D(tiles(D),B) · 128
sconv_dynamicx[B,D], state[B,D,3], static_w[4,D], dyn_w[B,H,4], out[B,D], D, hd_shift(tiles(D),B) · 128
inkling_attn_scoresQ[B,H,128], K[B,Hkv,T,128], rel[B,H,R], scores[B,H,T], H, Hkv, T, R, pos_q, window(T,H,B) · 1
inkling_attn_mixscores[B,H,T], V[B,Hkv,T,128], sinks[B,H], out[B,H,128], H, Hkv, T(H,B) · 128
attn_gatea[N], g[N], out[N], N(tiles(N)) · 128
route8logits[B,128], bias[128], ids[B,8], weights[B,8](B) · 1
softcap_swiglugate[B,I], up[B,I], weight[B], out[B,I], I(tiles(I),B) · 128
moe_combine8downs[B,8,D], out[B,D], D(tiles(D),B) · 128
attn_resV[B,K,D], queries[Q,D], out[B,Q,D], K, Q, D(Q,B) · 1
msg_gateh[N], msg[N], f_logit[N], m_logit[N], out[N], N(tiles(N)) · 128
logit_softcapx[N], out[N], N, cap_bits(tiles(N)) · 128
bf16_packsrc[N], dst[N], N(tiles(N)) · 128
bf16_unpacksrc[N], dst[N], N(tiles(N)) · 128