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 / codegen-rest / 2026-11-06

8dd6f58 Integration: refresh generated crumbs after focused gate Drake Stapleton committed 2026-11-06
..
.crumb836
README.md21823
coverage.json24388
differential-mutants.txt1858
host-sim-attn-final.txt48399
host-sim-five.txt21590
host-sim-qg.txt56262
replay-and-regeneration.txt1854

README.md

CodegenRest receipt — 2026-11-06

Outcome and scope

IMPLEMENTED: attn256, pattn256, router, FP8 GEMM, BF16 GEMV, pq and qg now default to first-party seeded Omega. The six retained C builders are differential-only under their default-off migration flags. Public API unchanged. EXERCISED: CPU differential, gcov, controls, seven recompiled Omega mutants, host checks and six-family warp simulation PASS. Hardware QUALIFIED: NOT_RUN. MERGED: no. DEPLOYED: no.

Branch: feat/omega-codegen-rest, based on 22ebf8f. Registration commit 3334df7; approved isolated replay meta[6] commit 5604269. The implementation revision is the commit containing this receipt. Pinned omega-mv: e5b32567; omc SHA256 2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f. Existing Omega Bridge exporter only; no new host dependency or compiler pin.

Remaining C is the permitted memory/ABI shell: spec widening/result copies, program allocation/statistics wrappers and the shared replay/allocator/encoder path. No family admission, geometry, scheduling or instruction-selection logic remains in the default C builders. No compiler/bridge extension is required by these six ports. RegAllocOm owns meta[7]; this lane only changes approved meta[6]. See om/codegen/README.md for the root wire and source-to-state mapping.

Domain and measured differential

The domain is partition plus boundaries derived from the C branch conditions, branch coverage X/Y (the measured X/Y for each builder is below), not a uint32 Cartesian product. The retained builders are independently compiled with GCC 13.3.0 -O0 --coverage -ffp-contract=off. Each family receives at least 10,000 deterministic generated scalar perturbations, 0 and UINT32_MAX in every u32 field, and threshold-minus-one/threshold/threshold-plus-one cases. Additional valid coupled seeds prevent earlier predicates from masking ROWS alignment, XBATCH output offsets, head-ratio and qg-immediate boundaries.

The finite control partition covers all admitted K steps and all resource-changing geometry/mode/mutant classes: attention depth/prep/multi/H/G/old-vs-general head layout; prefill group sizes; router warp/depth/expert/shared/ROWS forms; GEMM lane bytes/MT/warps/rowmap/unroll classes; BF16 rows/warps/depth/mask/batch/stride forms; pq input/group forms and qg RT/warp/epilogue/direct/wait/group/output-span forms. Wide valid head pairs cover full-width immediate arithmetic. Equal wide non-power query/KV head pairs additionally exercise the repaired attention pre-logarithm refusal. Scalar values that only change immediate payloads are represented by their source-derived boundaries and generated inputs.

Every accepted case compares every IR field, the complete allocation structure including live intervals/assignments, encoding return/length/bytes, and the default public shell against the independently renamed C builder. Refusals and public query results also match. Resource maxima include constructed refused cases, not only successful solves.

FamilyCasesAcceptedMax IR countMax virtual regsLinesBranches
attn256547815604901167515/516267/294
pattn25614742383632111279/280161/192
router401344635672114340/341236/260
gemm10115291381024256275/276235/250
bf163326894984699796213/214202/222
qg15574920571892106232/233269/301

coverage.json contains the measured per-source counts and every uncovered arc. Branch indices are zero-based within gcov's branch array for that source line. The following inventory accounts for every uncovered arc and uncovered statement; no uncovered input-admission branch is silently treated as covered.

Why remaining alternatives cannot be reached

  • E: Unreachable diagnostic at this constructor prefix: only fixed-array append/allocation failure or an already-set emitter error can select it. The source-derived finite shape partition covers every resource-changing prefix; no caller-supplied IR, allocation limit, scheduler kind or loop stack enters these builders. Reachable GEMM capacity refusals are exercised separately, not excluded. These remaining sites cannot be the first failing operation of an admitted prefix.
  • K: The switch/default error arm cannot be selected: every call passes one of the locally declared K_* constants, and the switch handles all of them. The uncovered default statement is the same unreachable arm.
  • X: Every emitted EXIT is constructed from I0 and remains unpredicated. Therefore its predicate-true scheduling alternative cannot occur.
  • B: All prefill branches passed through emit use bra_if_p0 or bra_if_p0_fwd, which explicitly set predicate_p0=true. The unpredicated terminal self-branch is appended directly, not passed through this conditional.
  • L: The source balances its fixed loop_begin/loop_end calls and never exceeds its fixed nesting bound. A malformed external loop stack is not an input.
  • U: Each loop is closed after a branch with no virtual-register operands. Thus no virtual-register last read can be the final branch instruction; the last_use<end false arc cannot occur.
  • I: All prefill virtual registers visited by this loop closure have an explicit definition. The first_def<0 alternative cannot occur in this constructor.
  • S: Zero head fields are replaced by positive defaults before this condition. Hence h<1 and/or kvh==0 cannot occur at this shape check; invalid nonzero ratios are covered.
  • P: All log2 arguments are powers of two after admission: lane_bytes is 8 or 16, mt is a nonzero power of two, LPB=128/lane_bytes and ROWW=32*lane_bytes. Therefore log2u cannot return -1 and the downstream negative-result alternatives cannot occur.
  • R: For admitted warps 8,16,32, W/4 is even and q advances by two from zero. Consequently q+1<W/4 is always true in these paired-row loops.
  • F: rows<=4 and normalized xbatch<=4 are already established, so rows*xbatch<=16. The >16 alternative is unreachable; the neighbouring ystride/shared-memory alternatives are covered.
  • D: Earlier admission bounds rows<=4, k<=16384 and depth<=16. Even their loose combined upper bound on this offset is 106496, below the signed-immediate bound 8388608. The rejecting alternative is impossible.
  • Q: The immutable plan comes only from om/prefill-shape/order.om: at most six records, opcodes 1..6, role indices 0..3, bounded immediates. Guarded plans have exactly one branch record with a nonnull initially-negative branch slot; unguarded plans have none. Invalid count/role/immediate/opcode, repeated/null branch, and downstream adapter-error alternatives therefore cannot occur.
  • C: The fixed-size native Omega call has valid ABI arguments and is deterministic. Its exporter-error alternative cannot occur; any bad shape/order is returned as the ordinary boolean admission value instead.
  • A: Earlier native_qgshape/qg_offset admission already refuses epi>1 and n==0, so these later duplicate alternatives cannot occur.
  • G: rt=8 requests the existing BW_PHYS_GPR_HW_LIMIT through the validated setter. This is an accepted constant, not a caller-controlled limit; setter failure cannot occur.
  • O: The same deterministic order query already succeeded during spec admission. Repeating it with the same group/column count and guard=1 cannot fail; guard=0 only removes records and cannot invalidate that admitted plan. The native ABI arguments are fixed and valid.

E is a per-prefix claim, not an assertion that every geometry fits the resource arrays: GEMM's reachable capacity/allocation refusals are in the corpus and covered. Its residual V128/UV64/prologue checks occur before the capacity-demanding constructor sections; later residual checks cannot be selected as the first failure of the finite admitted emitter-prefix classes. The other builders' fixed validated geometry classes stay within their append/allocation prefixes. No fault injection into private emitter state is an API input.

src/omega_blackwell_codegen_attn256.c

LineUncovered arcs / statementFunctionReason
3711emitK
450emitX
49statementemitK
510emitE
590VE
600V64E
610V128E
620UV64E
1131patch_braE
1210tailE
1230loop_beginL
1250loop_endL
1307loop_endU
1541, 7legacy_omega_dattn256_shapeS
1990legacy_omega_blackwell_codegen_decode_attn256_progE
2090legacy_omega_blackwell_codegen_decode_attn256_progE
2150legacy_omega_blackwell_codegen_decode_attn256_progE
2560legacy_omega_blackwell_codegen_decode_attn256_progE
3180legacy_omega_blackwell_codegen_decode_attn256_progE
3200legacy_omega_blackwell_codegen_decode_attn256_progE
3330legacy_omega_blackwell_codegen_decode_attn256_progE
3700legacy_omega_blackwell_codegen_decode_attn256_progE
3840legacy_omega_blackwell_codegen_decode_attn256_progE
4920legacy_omega_blackwell_codegen_decode_attn256_progE
4950legacy_omega_blackwell_codegen_decode_attn256_progE
5860legacy_omega_blackwell_codegen_decode_attn256_progE
6420legacy_omega_blackwell_codegen_decode_attn256_progE

src/omega_blackwell_codegen_pattn256.c

LineUncovered arcs / statementFunctionReason
3811emitK
460emitX
471emitB
50statementemitK
520emitE
600VE
610V64E
620V128E
630UV64E
1121patch_braE
1190tailE
1210loop_beginL
1230loop_endL
1281, 7loop_endI, U
1390hmmaE
1430nopE
1500lds_pfE
1621legacy_omega_pattn256_shapeS
1750legacy_omega_blackwell_codegen_prefill_attn256_progE
1790legacy_omega_blackwell_codegen_prefill_attn256_progE
1870legacy_omega_blackwell_codegen_prefill_attn256_progE
2000legacy_omega_blackwell_codegen_prefill_attn256_progE
2070legacy_omega_blackwell_codegen_prefill_attn256_progE
2090legacy_omega_blackwell_codegen_prefill_attn256_progE
2340legacy_omega_blackwell_codegen_prefill_attn256_progE
2360legacy_omega_blackwell_codegen_prefill_attn256_progE
2650legacy_omega_blackwell_codegen_prefill_attn256_progE
3030legacy_omega_blackwell_codegen_prefill_attn256_progE
3500legacy_omega_blackwell_codegen_prefill_attn256_progE
3810legacy_omega_blackwell_codegen_prefill_attn256_progE
3820legacy_omega_blackwell_codegen_prefill_attn256_progE

src/omega_blackwell_codegen_router.c

LineUncovered arcs / statementFunctionReason
3611emitK
440emitX
48statementemitK
500emitE
580VE
590V64E
600V128E
610UV64E
1071patch_braE
1150tailE
1170loop_beginL
1190loop_endL
1247loop_endU
1910legacy_omega_blackwell_codegen_router_progE
1960legacy_omega_blackwell_codegen_router_progE
2230legacy_omega_blackwell_codegen_router_progE
2361legacy_omega_blackwell_codegen_router_progR
2381legacy_omega_blackwell_codegen_router_progR
2650legacy_omega_blackwell_codegen_router_progE
3060legacy_omega_blackwell_codegen_router_progE
3590legacy_omega_blackwell_codegen_router_progE
3800legacy_omega_blackwell_codegen_router_progE
3860legacy_omega_blackwell_codegen_router_progE
4260legacy_omega_blackwell_codegen_router_progE
4470legacy_omega_blackwell_codegen_router_progE

src/omega_blackwell_codegen_gemm.c

LineUncovered arcs / statementFunctionReason
3811emitK
510emitX
55statementemitK
670V128E
680UV64E
1140loop_beginL
1160loop_endL
1310ldw_pfE
1353log2uP
1731, 3, 4legacy_omega_blackwell_codegen_fp8gemm_progP
1850legacy_omega_blackwell_codegen_fp8gemm_progE
2290legacy_omega_blackwell_codegen_fp8gemm_progE
2820legacy_omega_blackwell_codegen_fp8gemm_progE
2870legacy_omega_blackwell_codegen_fp8gemm_progE

src/omega_blackwell_codegen_bf16.c

LineUncovered arcs / statementFunctionReason
4011emitK
530emitX
57statementemitK
590emitE
670VE
680V64E
690V128E
700UV64E
1071patch_braE
1140tailE
1190loop_beginL
1210loop_endL
1267loop_endU
1435spec_okF
1480spec_okD
1660legacy_omega_blackwell_codegen_bf16_gemv_progE
1730legacy_omega_blackwell_codegen_bf16_gemv_progE
1900legacy_omega_blackwell_codegen_bf16_gemv_progE
2030legacy_omega_blackwell_codegen_bf16_gemv_progE
2090legacy_omega_blackwell_codegen_bf16_gemv_progE
2960legacy_omega_blackwell_codegen_bf16_gemv_progE

src/omega_blackwell_codegen_qg.c

LineUncovered arcs / statementFunctionReason
330legacy_omega_blackwell_codegen_pq_progE
370legacy_omega_blackwell_codegen_pq_progE
720legacy_omega_blackwell_codegen_pq_progE
811legacy_omega_qg_spec_okC
821legacy_omega_qg_spec_okA
841legacy_omega_qg_spec_okA
881legacy_omega_qg_spec_okC
1020qg_order_emitQ
1051, 3, 5, 6qg_order_emitQ
1086qg_order_emitQ
1141, 2qg_order_emitQ
115statementqg_order_emitQ
1180qg_order_emitE
1302legacy_omega_blackwell_codegen_qgemm_progG
1331, 2legacy_omega_blackwell_codegen_qgemm_progO
1341, 2legacy_omega_blackwell_codegen_qgemm_progO
1410legacy_omega_blackwell_codegen_qgemm_progE
1491, 2legacy_omega_blackwell_codegen_qgemm_progE, Q
1720legacy_omega_blackwell_codegen_qgemm_progE
1940legacy_omega_blackwell_codegen_qgemm_progE
2390legacy_omega_blackwell_codegen_qgemm_progE
2620legacy_omega_blackwell_codegen_qgemm_progE
2660legacy_omega_blackwell_codegen_qgemm_progE
2820legacy_omega_blackwell_codegen_qgemm_progE
2860legacy_omega_blackwell_codegen_qgemm_progE
3190legacy_omega_blackwell_codegen_qgemm_progE

Commands actually exercised

All test, differential, mutant, simulator and compiler commands below ran behind this exact device-free prefix:

bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10

The checkout was ~/work/cudastack/lanes/CodegenRest; OMEGA_MV=~/work/cudastack/omega-mv, OMEGA_OMC=$OMEGA_MV/seed/out/omc, and OMEGA_BRIDGE=~/work/cudastack/omega-bridge. The shell-expanded command tails were:

Command tail (after the prefix)rcObserved final line
env OMEGA_OMC=… OMEGA_BRIDGE=… sh om/units.sh0wrote checked portable Omega units to …/src
env OMEGA_OMC=… OMEGA_BRIDGE=… sh om/units.sh --check0PASS portable Omega units regenerate byte for byte
make -j3 OUT_DIR=build/codegen-rest-final OMEGA_OMC=… OMEGA_MV=… OMEGA_BRIDGE=… test-codegen-rest0PASS codegen-rest CPU-only differential controls
make -j3 OUT_DIR=build/codegen-rest-host OMEGA_MV=… OMEGA_BRIDGE=… test-codegen-rest-sim0GPU_QGEMM: PASS
Final relink of the five named non-qg host test binaries, then each with --host-only and --sim0 eachper-family table below; full commands in host-sim-five.txt
Final make -j3 … build/codegen-rest-host/gpu_qgemm_test, then qg --host-only and --sim0 eachGPU_QGEMM: PASS
After attention repair: make -j3 … build/codegen-rest-host/gpu_decode_attn256_test test-om-ir-limit, then attention --host-only and --sim0 eachattention host/sim PASS; replay-limit PASS

The final carried gate is stdout excerpt differential-mutants.txt (bg_982, rc 0). The underlying runner uses gcov --json-format --branch-counts --branch-probabilities on each retained-builder object; full generated gcov data is in build/codegen-rest-final/codegen-rest, with the compact permanent inventory in coverage.json. Logs replace /home/drakestapleton with ~; no other output transformation is applied to the simulator logs.

FamilyHost final lineWarp-sim final lineWarp issues
attn25661 checks, 0 failed: PASS14 checks, 0 failed: PASS10975936
pattn25619 checks, 0 failed: PASS30 checks, 0 failed: PASS53330976
router88 checks, 0 failed: PASS15 checks, 0 failed: PASS1703934
gemm59 checks, 0 failed: PASS21 checks, 0 failed: PASS7687894
bf16191 checks, 0 failed: PASS23 checks, 0 failed: PASS359562
qg / pqGPU_QGEMM: PASSGPU_QGEMM: PASSreported per case, not aggregated

host-sim-attn-final.txt is the post-attention-repair rerun, host-sim-qg.txt is post-initializer-order repair, and host-sim-five.txt records the final other-family host/sim commands. The earlier simulator target's missing-router-binary failure was fixed by making its prerequisites explicit rather than expanding variables before their definitions; the complete target and final focused reruns then passed.

Controls and defects fixed

  • IR record flip: caught for all six families, rc 1 with an IR mismatch.
  • Recompiled Omega mutants: fixed-stall mutation killed in every family (six); qg ignore-meta[6] killed by rt=8 refusal mismatch (one). Exact first failing instruction/case is in differential-mutants.txt.
  • Replay-limit test: meta6=0 preserves existing fixtures; accepted nonzero boundaries work; full-width out-of-range values refuse before destination mutation. The final qg corpus matches rt=8 IR, allocation and bytes to C, and the ignore-meta6 mutant is killed.
  • FP8 GEMM admission now bounds full-width mt before multiplying, preventing wrap-to-zero followed by accumulator-array overrun. C oracle and Omega both repaired.
  • Qg conditional array initializer allocation order is preserved; the rt=2/warps=4/SwiGLU/n=256 case exposed and now guards the swapped virtual-register defect.
  • Attention wide-head logarithm: before repair, UBSan at retained-source line 219 reported runtime error: shift exponent 32 is too large for 32-bit type 'unsigned int', rc 1, for depth=1, q_heads=kv_heads=UINT32_MAX, q_per_cta=1, multi=1. Both implementations now refuse non-powers before the logarithm. The same cc -O0 -g -fsanitize=undefined -fno-sanitize-recover=undefined -DCUDAPP_MIGRATION_PENDING_C_CODEGEN_ATTN256=1 -Isrc <minimal-main> src/omega_blackwell_codegen_attn256.c build/codegen-rest-host/libomega_gpu.a -lpthread -lm reproduction, compile and run both device-free, returns rc 0 with no diagnostics after repair. Its main returns whether the builder wrongly accepts that spec. The permanent differential includes this case, the high-bit neighbours, and a small non-power.

Wolfram derivation receipts

  • Table[{rt,epi,Floor[If[epi==0,(8388607-36)/(4 (16 rt-8)),8388607/(16 rt-8)]]},{rt,{2,4,8}},{epi,{0,1}}] -> {{{2,0,87380},{2,1,349525}},{{4,0,37448},{4,1,149796}},{{8,0,17476},{8,1,69905}}}. These exact qg_offset limits and adjacent legal spans are tested.
  • {4*4,(4-1)*16384*2+512*16,2^23,Table[{lb,128/lb,32*lb},{lb,{8,16}}],Table[{w,w/4,Table[q+1<w/4,{q,0,w/4-1,2}]},{w,{8,16,32}}]} -> {16,106496,8388608,{{8,16,256},{16,8,512}},{{8,2,{True}},{16,4,{True,True}},{32,8,{True,True,True,True}}}}. This proves F, D, P and R's arithmetic implications; BF16 constants are in its header lines 54 and 65.
  • Signed comparison bias and format constants are recorded in replay-and-regeneration.txt.

Tier verdicts and remaining gates

TierVerdict
Seeded regeneration byte checkPASS
Six-family C/Omega IR + complete allocation + bytes + refusalsPASS
Source-derived gcov corpus and uncovered-arc accountingPASS
Record-flip negative controlsPASS
Seven recompiled Omega mutantsPASS
Focused host checksPASS
Six-family warp simulationPASS
Integrated full make testNOT_RUN — integration owner owns it
Chip / live RM / VFIO / hardwareNOT_RUN — no authorized window
Merge / deploymentNOT_RUN

Chip runbook: om/codegen/CHIP.md. No device node, GPU lock, NVIDIA module or live service was opened or changed. Host and emulator results are not chip qualification. Integrator2 owns integration, shared meta7 reconciliation and the harness-guide adoption; this lane does not modify another repository's guide or pins.