Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/CUDApp/blob/main/evidence/codegen-moe-20261106/REPORT.md # 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 Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `CUDApp / evidence / codegen-moe-20261106 / REPORT.md` 78 lines · 8384 bytes Raw Blame History Rendered 1 # Seeded Omega MoE codegen migration 2 3 Stack: `feat/omega-codegen-moe` is based on CodegenA's `feat/omega-codegen-a` at ``89ee4db`` (generic replay introduced at ``22ebf8f``), not directly on main. Registration is commit ``9300208``. 4 5 ## Implementation 6 7 Both public `.h` APIs remain unchanged. The handwritten C implementations remain solely behind `CUDAPP_MIGRATION_PENDING_C_CODEGEN_MOE` and `CUDAPP_MIGRATION_PENDING_C_CODEGEN_MOE2`, each defaulting to zero. The default C entry points serialize the original specification, invoke seeded Omega, and replay records using the existing `omega_gpu_om_ir_replay`. C also serializes physical allocation metadata for the Omega scheduling pass; it does not choose instructions, allocations, loop extents, branch targets, decode arithmetic or stall values. 8 9 Units: 10 11 - `cg_moe_emit.om`: exact record/control packing, allocator requests, branch patching. 12 - `cg_moe_core.om`: validation, allocations, common prologue, deep staging, decoder and row-pipeline operations. 13 - `cg_moe.om`: step/deep/software-pipeline/coalesced-output builder. 14 - `cg_moe2.om`: row-pipelined builder. 15 - `cg_moe_sched.om`: physical-register dependency scheduling for variant 1's optional scheduling mode. 16 17 Compiler pin: omega-mv ``e5b32567``, omc SHA-256 ``2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f``. Generated portable C is checked in. The previous untracked emitter was treated as unproved input; branch origins, allocator metadata and loop handling were corrected against the C oracle. No prior lane receipt is reused. 18 19 ## Structural domain from the C oracle 20 21 Common: lane bytes 8 or 16; rows 1, 2, 4 or 8; warps every integer 1 through 32; positive K at most 32768, divisible by 128 and by `32 * lane_bytes`; signed row-load immediate bound. The harness iterates K in steps of 256 and lets the original C guard reject the wrong lane-width multiples. 22 23 Variant 1 additionally enumerates depth 0 through 16, scheduling/coalescing/weight-first each 0 or 1, and every mutant selector 0 through 5. Selectors 4 and 5 require coalescing; coalescing requires `warps * rows <= 32`. Nonzero depth divides the K-step count, requires `rows * depth * lane_bytes <= 128`, and K at most `512 * warps`. The C staging code supports a clamped partial final round; no stronger divisibility gate is introduced. 24 25 Variant 2 enumerates mutant selectors 0 through 3 and the common structural axes. It requires at most 16 K steps, `rows * steps * lane_bytes <= 128`, and K at most `512 * warps`. Its original C ignores the entire uint32 depth, scheduling, coalescing and weight-first fields. None lands in any immediate or other output field: the C oracle never reads them. The test therefore exercises every single-bit value and all-ones independently for each of those four fields at every accepted structural tuple. There is no claim to have enumerated the entire uint32 Cartesian product; structural exhaustion plus ignored-scalar bit basis is explicit. The source mutant leaking the high depth bit into a descriptor immediate is required to fail. 26 27 The host differential compares exact return codes, every IR instruction, allocation state, encoded SASS bytes and packed cubin bytes in memory. No output binaries, SASS, cubins, PTX or NVIDIA listings are committed. All scalar axes also receive boundary and bit-basis rejection checks. Refused programs have no specified scratch contents and only their exact return codes are compared. 28 29 ## Verification commands 30 31 Use the pinned environment: 32 33 ``` 34 export OMEGA_OMC=$HOME/work/cudastack/omega-mv/seed/out/omc 35 export OMEGA_BRIDGE=$HOME/work/cudastack/omega-bridge 36 bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 sh om/units.sh --check 37 bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 make -j3 test-codegen-moe-diff test-codegen-moe-sim 38 bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 python3 om/codegen/moe_mutants.py 39 bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 make -j3 test 40 ``` 41 42 Main subsequently required the device-free namespace wrapper shown above for all 43 new host/test launches. The initial receipts were launched before that policy; 44 their commands are preserved as actually run, not rewritten. These lane tests 45 link only builders, replay, encoder/cubin formatting and independent C oracles, 46 with no session/platform/device-open backend. Fresh wrapped simulator and 47 representative differential controls also passed; the namespace hid NVIDIA, 48 cuse and vfio nodes (`device-free.log`). The integrated full gate must use the 49 same wrapper. 50 51 The source-mutant runner requires baseline success, successful compilation of each altered `.om` input, and the differential harness's ordinary mismatch exit (not a crash). The independent functional simulator fixture uses `bw_warp_sim_k.h`, both builders, both fragment orders and ascending/descending/shuffled warp visits. The scale-drop negative control must change every output. The simulator does not model scoreboard timing. 52 53 ## Arithmetic provenance 54 55 WolframLanguageEvaluator: `FromDigits[#,16]& /@ {"358","380","388","390","398","39c","3a0","3a4","07F00000","80","`000fc000`","ffffffff"}` -> `{856,896,904,912,920,924,928,932,`133169152`,128,`1032192`,`4294967295`}`. 56 57 WolframLanguageEvaluator: `{2^64,2^56,512*1*1*1,512/128}` -> `{`18446744073709551616`,`72057594037927936`,512,4}`. 58 59 WolframLanguageEvaluator: `{(1+Mod[56,8]/8)*2^(Quotient[56,8]-7),512*(1+Mod[56,8]/8)*2^(Quotient[56,8]-7)}` -> `{1,512}`. This supplies the independent all-one e4m3 simulation reference. 60 61 ## Chip tier: NOT_RUN 62 63 No GPU window was authorized. No command in the host acceptance paths opens a device. No ROADMAP qualification status is upgraded. 64 65 In a separately authorized exclusive GB10 window, first build `taskset -c 10-14 nice -n 10 make -j3 build/gpu_fp8_api_test`. Capture the current revision, compiler/bridge pins and current window authorization in a new receipt directory. Run `./build/gpu_fp8_api_test --host-only` and `./build/gpu_fp8_api_test --sim`; then use the existing FP8 chip runner/authorization procedure to execute the chip parity and shipped negative-control battery with `./build/gpu_fp8_api_test --variant 1 --out /variant1.json` and `./build/gpu_fp8_api_test --variant 2 --out /variant2.json`. The checked CLI also supports `--sched`, `--depth`, `--coal` and `--wfirst`; exercise the default and scheduling/deep/coalesced/weight-first arms in separately named receipts. Record exit codes and output digests and preserve the shipped arithmetic/parity negative controls. Stop on a failed gate; do not weaken it. Chip qualification remains separate from host differential and simulator evidence. 66 67 ## Receipt state 68 69 - IMPLEMENTED: both default seeded builders, unchanged public APIs, C oracles and all host tiers. 70 - EXERCISED/PASS: exhaustive C-oracle differential, exit 0; final line `CODEGEN MOE DIFF PASS (`1732053` programs, 10681 refusals)`, with `CODEGEN MOE RECORD NEGATIVE CONTROL CAUGHT` (`differential.log`). This long-lived process used the pre-cleanup executable: final edits only moved metadata clearing after policy returns and removed unused scheduler latency state. The final generated units have the separate focused, mutation and regeneration receipts below; the integrated full gate remains pending on the current tree. 71 - EXERCISED/PASS: device-free final generated-unit `om/units.sh --check`, exit 0; final stdout line `PASS portable Omega units regenerate byte for byte` (`units-check-device-free.log`). 72 - EXERCISED/PASS: device-free final-unit warp simulation and two representative byte differentials, combined exit 0 (`device-free.log`; original pre-policy run in `sim.log`). 73 - EXERCISED/PASS: device-free seven seeded-source mutants compiled and were killed by ordinary differential mismatches, runner exit 0; final line `CODEGEN MOE OMEGA MUTANTS PASS (7 source-mutant controls)` (`mutants-device-free.log`; original pre-policy run in `mutants.log`). 74 - Full host suite: **NOT_RUN in this lane**, per Main's full-suite scheduling instruction. Integrator owns the no-deadline gate in `integ/omega-cuda-stack`, draft PR #280; no lane full-suite PASS line is claimed. 75 - QUALIFIED: **NOT_RUN**, chip window not authorized. 76 - MERGED / DEPLOYED: no. 77 78 Draft PR: https://github.com/aien-dev/CUDApp/pull/284, stacked on CodegenA.