Pure freestanding OM2: arrays, private f64 and no libc
Status: IMPLEMENTED and EXERCISED, not merged or deployed. No GPU, NVIDIA driver,
firmware or physical x86 qualification is claimed. Drake must review and approve the draft
profile/gate contract before merge. This stacks on bridge #70
(2156ca177c954130fa2fdedf86da0f836e8c8a95); frozen bridge #68 is unchanged.
Implementation and custody
The first-party generator is src/native.om (sha256
77e494baf62dc7dd4a65c2c15085e2a9fad2d19a2f71c18037196427e4ed2fe4).
tools-and-source.txt records the other tested source hashes and verification-tool versions.
No compiler or compiler pin changes in this slice:
- Generator OM1 compiler:
734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61. - Pure AArch64 OM2: omega-mv
e5b32567a7aff3ce594e3254a622a846a6cd190b, compiler2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f. - Pure x86 OM2: existing compiler
be8c51301307555254fc59e351d281aae1aa096d91521777e33a41c8b446448a; source custody remains as documented in NATIVE-ABI.md. - Full hosted AArch64 V2/device regression gate: existing A5 compiler
b8f8f1371bc0303f8da02db8b754e085d5dd852620c8d8d676c5769c233d9195. - Hosted x86 device regression gate: existing #1050 compiler
c5ac9979232afd0d750e1d5088af69692032997136f761e585a25aa9a1cfc87e.
The OM2 freestanding runtime uses generated byte-transport helpers with volatile stores,
not libc memset/memmove/memcpy. The entry's private out-frame is disjoint from valid caller
buffers. Status-0-only copy-back and caller-overlap refusals remain intact. Objects compile
with -fno-stack-protector; the import gate permits only the linker GOT marker, never a libc
function. The aggregate bare ELF has no undefined symbols at all.
The source scanner admits the needed private f64 operations behind an integer public ABI, not public float parameters/results or private f32. It parses parameter names separately from types, reuses the bounded positive named-extent parser, retains fresh/layout checks, and counts distinct source-name spellings rather than assignment occurrences. The 1024-name bound is unchanged. OM1 remains scalar/integer-only. Host words, storage and text stay refused.
Actual six-unit inputs
RegAlloc source root HEAD observed:
0df685dee3e93b79fa940900b7f344603bbd383d.
CoreUtil source root HEAD observed:
68c8cff68f9e3f3260fba42963f0253d804e3c5b (CUDApp draft #308).
The authoritative identities of exercised bytes are six-a64-sources.json and
six-x86-sources.json, including both original-source and composed-input sha256 values.
These are byte identities, not an assertion that another owner's worktree is clean.
Per RegAllocOm's explicit contract, snapshot these portable files separately and prefix
exactly om2\n, without changing any other byte:
om/codegen/regalloc.om->omega2_ra_run;om/codegen/regalloc_ir.om->omega2_ra_ir;om/codegen/regalloc_live.om->omega2_ra_live.
Snapshot CoreUtil's om/core/native.om, om/core/cubin.om and om/core/ampere.om unchanged;
they are already OM2. Do not concatenate the units or relax the OM1-array refusal to feed
portable sources directly. One invocation generates one library from all six immutable
input copies. Hosted and freestanding generation consume the same copies.
The caller exercises allocation, IR/liveness decisions, a full-size graph edit, log-one, padded NOP encoding and CUBIN metadata refusal. It checks an invalid large fixed-span length returns 32 without changing the result or image, and a wrong-result control exits 90. This is selected-path qualification of the actual composition, not the full CUDApp suite.
Actual policy/mm extension and whole-at refusal
The additional CUDApp source root is ApiPlanOm, observed HEAD
c0e085e99da555798686c109d8a9294c173cddf5 (draft #306).
--api adds the complete portable om/components/api_policy.om and api_mm_plan.om,
each with exactly the same om2\n prefix and no other transformation. Their source/input
hashes are in eight-{a64,x86}-sources.json; all eight actual units share one library.
The additional bare and hosted calls exercise policy rem acceptance/refusal and the
matmul plan's 16-word edit, compare all words against the independent Wolfram result
below, and check a short view leaves every word and the result unchanged.
No C _exit, setjmp/longjmp, memory helper or 128-bit-division runtime is linked.
The complete api_at_plan.om also receives only om2\n, but remains an explicit negative
control in this profile: exit 110, no output installed, because private f32 is excluded.
The original source additionally used the OM2-reserved local name part; the first attempt
failed with compiler9 before the scanner. red-api-at-reserved-name.log and its source
identity preserve that observation. ApiPlanOm repaired the private name to partsz in
the revision above, without changing the algorithm. The final whole-at negative control
reaches the profile refusal on both targets; it is not attention-plan qualification.
Two separately copied, exactly-one-site source mutants compile and link under the same
bare constraints: reverse the policy's remainder predicate -> exit14; change the matmul
plan's put a 8 m to put a 8 add m 1 -> exit15. Both are caught before stdout.
Baseline input copies are never mutated. eight-{a64,x86}-commands.log records every
compiler, linker, inspector, executable and expected-failure rc; no binaries are committed.
Commands and observed results
commands.json records actual argument arrays and relevant explicit environment values.
~ replaces /home/drakestapleton in all published text; expand it to the local HOME when
reproducing. Logs are linewise text with LF endings. Binary differential stdout in the
aggregate command traces is encoded as stdout_hex, not committed as a binary.
The host environment was inherited; this is not an env -i hermeticity claim.
Every command and child ran in this device-free namespace. No test was rerun outside it.
bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 python3 tests/native/test_freestanding.py
bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 python3 tests/native/test_freestanding_om2.py
bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 sh tests/native/v2/run.sh
bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 sh tests/native/x86/run.sh /tmp/bh/freestanding-x86-green
bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 python3 tests/native/x86/device.py /tmp/bh/freestanding-x86-device
bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 python3 tests/native/test_freestanding_aggregate.py --regalloc ~/work/cudastack/lanes/RegAllocOm --core ~/work/cudastack/lanes/CoreUtilOm --target aarch64linux --out /tmp/bh/freestanding-six-a64-new
bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 python3 tests/native/test_freestanding_aggregate.py --regalloc ~/work/cudastack/lanes/RegAllocOm --core ~/work/cudastack/lanes/CoreUtilOm --target x86linux --out /tmp/bh/freestanding-six-x86-new
bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 python3 tests/native/test_freestanding_aggregate.py --regalloc ~/work/cudastack/lanes/RegAllocOm --core ~/work/cudastack/lanes/CoreUtilOm --target aarch64linux --out /tmp/bh/freestanding-eight-a64-green --api ~/work/cudastack/lanes/ApiPlanOm
bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 python3 tests/native/test_freestanding_aggregate.py --regalloc ~/work/cudastack/lanes/RegAllocOm --core ~/work/cudastack/lanes/CoreUtilOm --target x86linux --out /tmp/bh/freestanding-eight-x86-green --api ~/work/cudastack/lanes/ApiPlanOm
The full V2/device gate needs the hosted A5 compiler, not the pure e5 compiler. Pure AArch64
qualification uses e5. x86 aggregate prerequisites additionally select x86_64-linux-gnu-gcc,
x86_64-linux-gnu-nm and the QEMU 10.0.14 runner with /usr/x86_64-linux-gnu; see commands.json.
| Tier | rc | Observed final line / witness | Receipt |
|---|---|---|---|
| OM1 host | 0 | PASS source-swap control refuses original non-pure snapshot; reread mutant admits mismatched source/code and is caught | om1-host.log |
| OM2 pure host | 0 | PASS OM-2 public floats, private f32, malformed literal, unused host helper and storage refused before output | om2-pure-host.log |
| Full AArch64 V2 | 1 | NATIVE-V2 FAIL 1 | v2-known-fail-one.log |
| x86 six-language | 0 | NATIVE-X86 EMULATED PASS (six languages built and run; native x86 NOT_RUN) | x86-emulated.log |
| x86 device ABI | 0 | NATIVE-X86-DEVICE EMULATED PASS shared fixtures, 15 word controls, 5 ABI1 controls, 3-unit context ABI, 12 mutants; native/driver/chip NOT_RUN | x86-device-emulated.log |
| Six-unit AArch64 bare ELF | 0 | PASS allocator, IR, liveness, graph, private f64, padded NOP and CUBIN refusal; bad span untouched; wrong-result control exits 90 | six-a64.log, six-a64-commands.log |
| Six-unit x86 bare ELF | 0 | Same exact final line as AArch64; EMULATED only | six-x86.log, six-x86-commands.log |
| Eight-unit AArch64 bare ELF | 0 | PASS actual policy/mm views and rem without libc; short span untouched; whole at private-f32 refusal110; two source mutants caught | eight-a64.log, eight-a64-commands.log |
| Eight-unit x86 bare ELF | 0 | Same exact final line; EMULATED only | eight-x86.log, eight-x86-commands.log |
The sole final V2 failure is unchanged:
FAIL hoist writes 0 of x20..x26 and 3 of d8..d15: OMEGA_NATIVE_OMC2 does not hoist (omega-mv perf/omc-loop-checks).
It was not suppressed, normalized or reclassified as PASS. The earlier setup probe in
setup-wrong-pure-pin-v2.log used pure e5 for device fixtures and failed with rc1/FAIL9;
correcting the prerequisite to the already-pinned hosted A5 compiler, without changing a
gate, produced precisely the known FAIL1 above. The historical span comparator is untouched.
After staging the new inputs/receipts (so tracked-file counts include them), the exact
metadata commands also ran in the namespace:
bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 crumb compile .
(rc0, crumb compile: 11 crumbs, 4 rewritten, HEAD a4dd96c) followed by
bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 crumb verify .
(rc0, crumb verify: OK: 11 crumbs current). This is metadata verification, not a runtime tier.
Negative controls and test-first failures
red-no-libc-link.log: the new strict OM2 relocatable-link test first failed on unresolved memmove/memset. The generated transport removes those imports; the bare link, nm and readelf checks now pass on both targets.red-private-f64.log: private f64 fixture first refused with exit 110. Public f64, private f32 (including after fresh/named extents), malformed exponent, storage and an unused host helper still refuse before output. Crafted frames test the scanner only and are never run.red-distinct-name-boundary.log: a duplicate name at capacity first refused. Repeated assignments and a duplicate at full capacity now pass; a new 1025th spelling still refuses. Removing the exact deduplication loop restores the repeated-name refusal and is caught.- Dropped copy-back leaves every digest at the pre-call fill. Wrong zero initialization has
the exact
outok 0 2 7 0witness; copying after a trap has the exactouttrap 5 0witness. A forced libc-copy import is rejected by nm and preserves the installed object. - Existing OM1 pthread-import, failing/missing symbol inspector, failed import-filter and source-snapshot swap controls continue to pass.
- Both six-unit bare executables have empty
nm -u, no interpreter and no TLS sections. They produce bytes identical to the hosted caller. The separately linked wrong-result controls exit 90 without stdout. All exact commands and rc values are in their traces.
Narrow independent FP oracle correction
red-x86-c-oracle-indefinite.log observed division of negative zero by negative zero:
Omega 7ff8000000000000, C/SSE fff8000000000000, status 0. This is not a compiler defect:
the x86 source explicitly preserves operand-NaN sign/payload in xfnans and emits Arm's
positive default NaN for invalid arithmetic in xfdefnan (omega-mv c6c30fe3).
Read-only review recommended normalizing **only the C oracle's exact zero/zero negative
indefinite**, never the Omega output, not broad NaN equivalence. That precise predicate is
implemented in the new test, not in an existing historical byte-comparison gate.
The same comparison must reject a negative indefinite, a different payload, or nonzero
status where the canonical positive result is required. Targeted addition with the negative
NaN encoding in either operand position must preserve it exactly. The full matrix retains
raw signed-zero, subnormal, payload, unary-negation and ordinary-value comparisons.
x86-fips-out-fp-witness.log records floatbits 1 with exit 0 on the final matrix.
Hardware FP must already be enabled and the caller's control modes are inherited, not
configured by the wrapper. FP exception/status-flag preservation is not promised.
This does not qualify firmware/kernel FP-state management.
Mathematical oracle queries
WolframLanguageEvaluator:
Map[Function[b,{b,Quotient[b,2^63],Mod[Quotient[b,2^52],2^11],Mod[b,2^52]}],
{16^^8000000000000000,1,16^^7ff8000000000001}]
-> {{9223372036854775808,1,0,0},{1,0,0,1},
{9221120237041090561,0,2047,2251799813685249}}
{32*16, Log[1]} -> {512,0}
These supply expected bit classifications, padding bytes and log-one, not GPU measurements.
The additional expected matmul-plan words and remainder controls use:
WolframLanguageEvaluator:
Module[{m=17,k=19,n=9,mp,kp,np,a5=16^^a5},
mp=16 Ceiling[m/16];kp=16 Ceiling[k/16];np=8 Ceiling[n/8];
{"mm"->Join[{m,k,n,0,0,0,0,0},
{mp,kp,np,2 mp kp,Max[4 mp np,64 8 Ceiling[0/8]],2 kp np,k n,a5}],
"at"->Join[{8,2,64,0,0,0,0,0},
{IntegerExponent[Quotient[8,2],2],1},ConstantArray[a5,6]],
"badat"->Join[{7,2,64,0,0,0,0,0},ConstantArray[a5,8]],
"remainders"->{Mod[128,128],Mod[129,128],Mod[7,2]}}]
-> {"mm"->{17,19,9,0,0,0,0,0,32,32,16,2048,2048,1024,171,165},
"at"->{8,2,64,0,0,0,0,0,2,1,165,165,165,165,165,165},
"badat"->{7,2,64,0,0,0,0,0,165,165,165,165,165,165,165,165},
"remainders"->{0,1,1}}
The at vectors are derived expectations only, not exercised evidence in this profile.
Limits and external gates
- Focused host and x86 EMULATED tiers: PASS as listed.
- Full AArch64 V2 gate: FAIL, exactly the one existing hoist assertion.
- Physical x86, NVIDIA driver/GPU/chip and firmware: NOT_RUN; none authorized here.
- Merge/deployment: NOT_RUN; Drake's approval is required before merge.
- No compiler, frozen PR, GPU service or live device was changed. A separate authorized
metadata-only commit refreshes
evidence/native-x86-aien-abi1/.crumbfrom count0 to9: logs had been committed after its old count.git diff --stat -- evidence/native-x86-aien-abi1showed that.crumbas the only changed file under the old receipt. Every old log byte remains unchanged; the exact commit iscrumb: refresh native-x86-aien-abi1 metadata count 0->9 (logs committed after count; no receipt change).