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 / regalloc-om / 2026-11-06 / README.md

127 lines · 6492 bytes Raw Blame History Rendered
1# Core register allocation and matmul Omega port receipt
2
3Branch: `feat/regalloc-om`, based on CUDApp `22ebf8fc281faabe8df241b04eaff62e6a91d2f6`.
4Status: **IMPLEMENTED and EXERCISED for the core allocator, IR helpers, five
5matmul builders, scalar register/layout decisions and vecadd writer. The whole
6assigned file set is NOT COMPLETE.** Nothing is merged, deployed, or chip-qualified.
7
8## Source and compiler identities
9
10- Seeded Omega compiler: omega-mv e5b32567; omc SHA-256
11 `2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f`.
12- Frozen bridge checkout used by the hosted private gate: bc11b30b1faa9af8b875ae6fec24e5f49cf03ac4.
13- Native function-mode compiler binary at `lanes/bh-tools/omc-native`: SHA-256
14 `734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61`.
15- Source and wire contract: `om/codegen/REGALLOC.md` and
16 `src/omega_gpu_om_ir.h`. Native aggregate registration belongs to Integrator;
17 this lane generates a private test aggregate, not a second production library.
18
19The C allocator and matmul builders remain only behind the explicit migration
20switches. No op enum values changed. The last-use override wire is extension-only
21and applied before one solve; invalid flags, shortened lifetimes, past-end hints,
22v159 and v160 are exercised. The simulator repair is isolated as commit
23`6a855fc`; its separate receipt is `signed-ge/README.md`.
24
25## Commands and observed results
26
27All commands below ran inside the device-free namespace. Expected legacy-oracle
28refusal diagnostics are emitted for invalid generated shapes; they are not
29unexpected test errors.
30
31```sh
32bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 sh tests/regalloc_om/run.sh
33```
34
35Exit 0. Final result lines:
36
37```text
38PASS exact-liveness flag-zero flag-invalid shortened past-end v159 v160
39PASS scalar register and matmul policies cases=10000 including uint32 wrap boundaries
40PASS regalloc differential cases=181614 refused=179089 encoded=2525 record-flip=caught
41PASS signed GE host-reference cases=98 register and immediate
42PASS existing encoder golden fixtures and vecadd SHA-256
43PASS matmul warp-sim cases=15 CPU oracle bit-identical
44```
45
46The differential includes 10000 deterministic random IR programs (mixed scalar,
47pair, quad and uniform registers, capacity exhaustion, register pressure and
48partial refusal state), all five generated builder families, and the canonical
49fixture corpus reused directly from `test_omega_codegen_freestanding.c`.
50It compares the entire program, allocation maps, refusals and successful encoded
51bytes. A flipped instruction record is detected.
52
53```sh
54bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 python3 tests/regalloc_om/mutants.py
55```
56
57Exit 0; final line `PASS recompiled Omega semantic mutants=10`.
58Each mutant compiles with rc0 and is rejected semantically with rc1:
59
60| Mutant | Observed detection |
61| --- | --- |
62| pair-alignment | program/map/partial-state case 1 |
63| reserved-gpr | program/map/partial-state case 1 |
64| equal-endpoint-release | program/map/partial-state case 7 |
65| sort-order | program/map/partial-state case 1 |
66| reserved-ugpr | program/map/partial-state case 9 |
67| quad-alignment | program/map/partial-state case 1 |
68| shortened-override-check | liveness case 3 rc0, expected10 |
69| v159-boundary | liveness case 1 rc10, expected0 |
70| override-ignored | program/map/partial-state case 53004 |
71| override-shortened | refusal case 53004 |
72
73Per-mutant compile/exercise logs and TSV are in `build/regalloc-om/`.
74The separately recompiled unsigned-GE simulator mutant is also killed; see the
75isolated signed-GE receipt. Compile failure is never counted as a killed mutant.
76
77## Verdicts
78
79| Tier | Verdict | Scope |
80| --- | --- | --- |
81| Hosted allocator/builders | PASS | Differential, refusals, exact maps/bytes, scalar policies |
82| Semantic mutants | PASS | Ten Omega mutants plus unsigned-GE simulator control |
83| Warp simulation | PASS | Fifteen BF16 fragment/block cases against CPU oracle |
84| Existing encoder fixtures | PASS | Existing fixture entrypoints and vecadd SHA-256 |
85| Freestanding OM2 arrays | NOT_RUN | Integrated BridgeHost extension not adopted here |
86| Full integrated make test | NOT_RUN | Integrator owns the one integrated gate |
87| Chip/live RM/VFIO | NOT_RUN | No current authorization |
88| Whole assigned file-set migration | NOT COMPLETE | Remaining C below |
89
90## Remaining assigned C and exact external prerequisite
91
92The following are not represented as completed Omega migrations:
93
94- Program encoding dispatch/wrappers in `omega_blackwell_codegen.c` still use
95 their existing C orchestration around the already-Omega instruction encoder.
96- Packing/sentinel helpers in that file remain C.
97- `src/omega_blackwell_matmul.c` spec, binding and dispatch policy remains C;
98 the CPU arithmetic routines also remain as verification oracles.
99- `src/omega_blackwell_realize.c` remains C.
100- `src/omega_bw_hazard.c` remains C.
101- `src/omega_blackwell_encoder.c` has its vecadd writer ported; existing digest
102 orchestration and golden-fixture verification remain C.
103
104No language impossibility has been established for the unimplemented policy,
105packing or hazard logic. Native OM2 dynamic typed views are an available route;
106there is no justified fixed-size cap or host fallback to add. Hashing should
107reuse CoreUtilOm's unchanged public SHA-256 API rather than duplicate it.
108
109The concrete external gate is the frozen bridge freestanding path: canonical
110OM2 `regalloc.om` is refused with rc110, as documented in NATIVE-ABI.md:265-267.
111The required extension is freestanding OM2 plus sized/dynamic array lowering
112with the same admission, bounds and trap semantics and a no-libc link check.
113Main assigned this to BridgeHost; it is not silently substituted by hosted code.
114Integrator must register all eleven units in its single native aggregate and
115qualify that extension before a production/freestanding completion claim.
116
117No current request authorizes chip execution. Runbook:
118`tests/regalloc_om/CHIP.md`.
119
120## Numeric constant provenance
121
122WolframLanguageEvaluator query:
123`FromDigits[#,16]& /@ {"000ea800","000f2800","014fde00","000fdc00"}`
124returned `{960512,993280,22011392,1039360}` for the existing LDG_A, LDG_B, HMMA
125and NOP schedule constants. The vecadd word constants were likewise converted
126from the existing first-party fixture using Wolfram, and its existing golden
127SHA-256 test passes. These are encoder constants, not measured performance.