interplane.Get Omega
Read in your language

omega-bridge

Omega-first language interoperability: checked conversion backends and native language bindings

Brought by drakestapleton

branch main Branches Tags History

omega-bridge / evidence / native-x86-aien-abi1 / README.md

138 lines · 7035 bytes Raw Blame History Rendered
1# Hosted x86 + exact ABI1 native bridge qualification
2
3This is a new CPU/emulator receipt. Frozen #1046/#68 and their receipts were not modified.
4Drake must review and approve the compiler/bridge contract and gate maintenance before merge.
5Nothing was merged or deployed by this lane.
6
7## Pins and source
8
9- Bridge code tested: `3c8a93bbc3c7cf5e39b7c90e795cd2002fae4038`.
10 The subsequent receipt commit changes documentation/evidence, not executable code.
11- Base: bridge #69, `248a198480485101cb6c4bb1c2c926ef3fd4ce90`.
12- Production bridge changes: `c1282b2`; isolated gate maintenance: `62d6a23`;
13 new x86 fixture-count correction: `3c8a93b`.
14- Compiler draft: omega-mv #1050, `9101aee8f4f47476a8dd056d132007221d691946`.
15 Tested source is `c6c30fe3e62f4ba5496ef7225f72ecd9c62c6300`.
16- Hosted-x86 omc SHA256:
17 `c5ac9979232afd0d750e1d5088af69692032997136f761e585a25aa9a1cfc87e`.
18 Built executable: `~/work/cudastack/lanes/omega-mv-bh-aien-x86/seed/out/omc`.
19- AArch64 device compiler remains #1047, SHA256
20 `b8f8f1371bc0303f8da02db8b754e085d5dd852620c8d8d676c5769c233d9195`.
21 Pure x86 retains the existing `be8c5130...` pin. No existing profile is silently repinned.
22- Baseline native compiler: `~/work/cudastack/lanes/bh-tools/omc-native`, SHA256
23 `734f0a39319fbfa930bcc62cb30dbf06d47d78e126372b74f5baf478e6126b61`.
24- QEMU 10.0.14: `~/.local/opt/qemu-oracle-10.0.14/build/qemu-x86_64`, SHA256
25 `f06a88cc85fad35abf71ad9ca49ec3caa966a896aef2c5839124081429b6d3f4`.
26
27`environment.json` records the actual non-secret environment for each conductor.
28Home prefixes in recorded environment/logs are normalized to `~`; expand them when reproducing.
29Log files were read using explicit contiguous line ranges and joined with LF, without truncating
30long logs. No result lines were changed.
31
32## Device-free commands and observed results
33
34All acceptance commands below ran in the bridge worktree inside a minimal `/dev` namespace:
35
36```sh
37bwrap --dev-bind / / --dev /dev --proc /proc -- \
38 taskset -c 10-14 nice -n 10 \
39 python3 tests/native/x86/device.py /tmp/bh/x86-aien-device
40```
41
42Environment: `device` in `environment.json`. rc=0; `device.log` ends:
43
44```text
45NATIVE-X86-DEVICE EMULATED PASS shared fixtures, 15 word controls, 5 ABI1 controls, 3-unit context ABI, 12 mutants; native/driver/chip NOT_RUN
46```
47
48```sh
49bwrap --dev-bind / / --dev /dev --proc /proc -- \
50 taskset -c 10-14 nice -n 10 \
51 sh tests/native/x86/run.sh /tmp/bh/x86-aien-emulated-final
52```
53
54Environment: `emulated` in `environment.json`. rc=0; `emulated-final.log` ends:
55
56```text
57NATIVE-X86 NATIVE NOT_RUN (physical x86 execution not requested)
58NATIVE-X86 EMULATED PASS (six languages built and run; native x86 NOT_RUN)
59RC=0
60```
61
62```sh
63bwrap --dev-bind / / --dev /dev --proc /proc -- \
64 taskset -c 10-14 nice -n 10 \
65 sh tests/native/v2/run.sh /tmp/bh/x86-aien-v2-final
66```
67
68Environment: `v2` in `environment.json`. rc=1; `v2-final.log` has exactly one `FAIL`:
69
70```text
71FAIL hoist writes 0 of x20..x26 and 3 of d8..d15: OMEGA_NATIVE_OMC2 does not hoist (omega-mv perf/omc-loop-checks)
72```
73
74Its final lines are exactly:
75
76```text
77NATIVE-V2 FAIL 1
78RC=1
79```
80
81This is the preexisting hoist baseline, not PASS. It was not suppressed, reclassified or fixed here.
82The same run passes all three-unit shared-context controls, single-edit controls, and the AArch64
8311-mutant device conductor.
84
85## Multi-input, contexts and refusal controls
86
87`tools/native --host OUT ctxnew.om ctxput.om ctxget.om` already accepts multiple units in one
88invocation. The fixture generates one runtime/context API, then exercises all three units against
89both default and explicit contexts. It checks stale/foreign handles, context ownership, live destroy,
90retired/quarantined slots, drop retry after forced cleanup failure, and pure-profile refusal.
91No second context runtime is linked and no algorithmic host implementation is introduced.
92
93The x86 conductor kills all12 mutants, including wrong ioctl, missing MFENCE instruction structure,
94entry31, context generation/capacity/destruction, read-only publication, bind ownership, failed-bind
95retirement, quarantine guard/publication, and the newly removed exact-length guard. The latter must
96reach the short-count assertion with rc42 (`aien-length-mutant.log`), not merely crash.
97The fence oracle checks emitted instructions; it is not a measured WC-reordering result.
98
99## Exact ABI1 emulated oracle
100
101A direct strict-Linux invalid-fd oracle under this pinned QEMU returned rc44 because QEMU reports
102ENOTTY for the unknown exact A-type requests before validating fd-1. The original diagnostic is
103preserved in `aien-qemu-strict-ebadf-red.log`; this CPU-only red check predates the namespace mandate.
104It ran no GPU/device client and opened no NVIDIA device.
105
106`OMEGA_AIEN_QEMU10_ORACLE` is an explicit test-only selection: x86/QEMU expects exactly ENOTTY;
107default AArch64/Linux still expects exactly EBADF. Neither path accepts both as a fallback.
108`aien-strace.log` records exactly two calls for each of the five exact requests (ten calls total).
109Short/long views trap before ioctl; removing that guard is caught at the attributed rc42 assertion.
110No aien-gpu device was present or opened, so driver behavior remains NOT_RUN.
111
112## Historical zero-init comparator and its count correction
113
114Gate maintenance is isolated in the required commit:
115`gate(v2): normalize intentional span zero-init in historical baseline`.
116Only the exact old `ombr_span sp[7];` can correspond, at the same position, to the exact new
117`ombr_span sp[7] = {{0}};`. Each fixture asserts its expected count. Every other output byte,
118return code and stderr comparison remains unchanged.
119
120The comparator self-test retains five refusal controls, including a different one-byte change in
121the same wrapper. Individual fixture counts come from explicit exports (or the one implicit export).
122Combined OM1 has9 wrappers. The original v2 combined set includes hoist and has14; the new x86
123combined OM2 set is madd+vec+lay+one and has13. Neither set was changed to force a count.
124
125The first new x86 run incorrectly asserted14 for that13-wrapper set and failed exactly that assertion;
126`emulated-first-count-red.log` preserves the complete rc1 run. Commit `3c8a93b` corrects only the new
127x86 assertion/documentation to13. The final run passes. The original v2 count14 and its known
128`NATIVE-V2 FAIL 1` stay unchanged. This is intentional gate maintenance needing Drake's review.
129
130## Verdicts
131
132- IMPLEMENTED: strict hosted-x86 ABI1 compiler profile, one-runtime multi-unit fixture,
133 explicit emulated invalid-fd oracle, exact historical zero-init comparator.
134- EXERCISED/PASS: device-free x86 device/context conductor (12 mutants), six-language EMULATED gate,
135 single-edit four-profile controls and GCC warning mutant, exact comparison negative controls.
136- FAIL: full AArch64 v2 remains exactly the known hoist `FAIL 1`.
137- NOT_RUN: physical x86, real aien/NVIDIA driver, GPU/chip, WC timing and hardware qualification.
138- MERGED/DEPLOYED: neither; Drake's review/approval is the external gate.