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 / seed / kflow / README.md

151 lines · 11282 bytes Raw Blame History Source

seed/kflow/: KernelFlow, one tool from "I need a kernel" to a receipt

Status: milestone 1 IMPLEMENTED and EXERCISED on the host (the Spark, arm64). No GPU ran anything from it: every gpu and cloud stage is a queued job file with status NOT_RUN. Nothing here is QUALIFIED.

All three programs are seeded Omega (OM-2), built by the pinned seed/out/omc. nvdisasm and cuobjdump (CUDA 13.0) are read-only oracles; nothing they print is copied into an output.

filewhat it is
kflow.omthe conductor: reads a spec, runs the stages, caches them, writes receipts and queue files
kemu.omhost SASS emulator for the instructions these kernels use (sm_121 and sm_80); harnesses vadd, radd, tmm1, tmmt, tsmx
kpack.omcubin packer, a port of CUDA++ src/omega_cubin.c (aien-dev/CUDApp 853e814d)
m1.specmilestone 1: 4 jobs and 3 negative controls, 31 expectations
sm121/resadd.s2, sm121/resadd.c.bin35B decode RES ADD, sm_121 listing and the C encoder's bytes (CudaArch r6)
sm80/resadd.s2the same kernel ported by hand to sm_80, every instruction with a ;= intent text
specs/tmatmul16.spec, sm121/tmatmul16.s216x16x16 tile matmul on sm_121 HMMA.16816.F32 (f16 in, f32 out): 4 jobs, 20 expectations
specs/tsoftmax.spec, sm121/tsoftmax.s2row softmax, one warp per 32-value f32 row (SHFL.BFLY, MUFU.EX2/RCP): 3 jobs, 13 expectations
TILE-WORDS.mdOMEGESE proposal: tile words that would generate these two listings (PROPOSED, no compiler change)

Build and run (from the omega-mv root)

mkdir -p build/kflow
for p in kflow kemu kpack; do seed/out/omc < seed/kflow/$p.om > build/kflow/$p && chmod +x build/kflow/$p; done
build/kflow/kflow seed/kflow/m1.spec STATE      # exit 0 only if every expectation holds

The manual process it replaces

step done by hand todaykflow stage
write a .s2 listing from a template or by handgenerate (design only; OmegaIntent #838/#843 IR is the planned source)
pick stall/yield/scoreboard words by handschedule (design only; per-arch latency tables, vectors/sched80.tsv is NAK's reference)
cat TABLE LISTING \| asm2.binencode
compare bytes with the C encoder or NAK by hand, read nvdisasm output by eyeverify
build a cubin with CUDA++ omega_cubin.c, check with cuobjdumppackage
no host check existed before a chip runemulate (kemu)
ask for a GPU window, run the chip gategpu: STATE/queue/gpu/NAME.job, NOT_RUN
rent a card through CloudKernelscloud: STATE/queue/cloud/NAME.job, NOT_RUN, needs the budget cap
try variants, keep the fastestsearch/tune (design only; needs gpu or cloud timings)
write up the evidencereceipt: STATE/jobs/NAME.receipt

Stage statuses are NOT_RUN, INVALID, INCOMPLETE, VALID-UNPROVEN and QUALIFIED; there is no bare PASS. INVALID stops the job. QUALIFIED needs a chip run, so milestone 1 never prints it.

Each stage is cached in STATE/cache/KEY.*, KEY = sha256 of the stage name, the tool's sha256, the input sha256s and the parameters. This is a content hash of bytes; the semantic hash of #830 is meant to replace it for listings and is not wired in yet.

Spec language

tool NAME PATH                       asm2 | nvdisasm | cuobjdump | kemu | kpack (all five required)
tsub LINE OLD NEW                    next job only: table line named LINE, token OLD -> NEW (exactly one hit)
lsub OLD NEW                         next job only: listing token OLD -> NEW (exactly one hit)
nointent                             next job only: ignore ';=' lines
job NAME ARCH TABLE LISTING REF HARNESS REGS P...   ARCH 80|121; REF a .bin or '-'; HARNESS or '-';
                                     P = p8|1|2|4|8 parameter sizes, laid out from c[0x0][0x380]
expect STAGE STATUS                  about the job above; STAGE encode|verify|package|emulate|gpu|cloud|job

Milestone 1 results (MEASURED on the Spark, 2026-10-26)

Run: build/kflow/kflow seed/kflow/m1.spec /tmp/kfx/st2, binaries from seed/out/omc sha256 2c824805… at omega-mv 369dbc96. Copies of the output, receipts and queue files are in /home/drakestapleton/handoffs/KernelFlow/m1/.

Tile kernels (OmegaTile, MEASURED on the Spark, 2026-10-26)

Runs: build/kflow/kflow seed/kflow/specs/tmatmul16.spec STATE gives `KFLOW expectations met=20 failed=0 jobs=4; .../tsoftmax.specgivesmet=13 failed=0 jobs=3; m1.specstill givesmet=31 failed=0 jobs=7`. Copies: /home/drakestapleton/handoffs/OmegaTile/evidence/. No GPU ran either kernel (gpu and cloud NOT_RUN).

Limits