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 Source

Hosted x86 + exact ABI1 native bridge qualification

This is a new CPU/emulator receipt. Frozen #1046/#68 and their receipts were not modified. Drake must review and approve the compiler/bridge contract and gate maintenance before merge. Nothing was merged or deployed by this lane.

Pins and source

environment.json records the actual non-secret environment for each conductor. Home prefixes in recorded environment/logs are normalized to ~; expand them when reproducing. Log files were read using explicit contiguous line ranges and joined with LF, without truncating long logs. No result lines were changed.

Device-free commands and observed results

All acceptance commands below ran in the bridge worktree inside a minimal /dev namespace:

bwrap --dev-bind / / --dev /dev --proc /proc -- \
  taskset -c 10-14 nice -n 10 \
  python3 tests/native/x86/device.py /tmp/bh/x86-aien-device

Environment: device in environment.json. rc=0; device.log ends:

NATIVE-X86-DEVICE EMULATED PASS shared fixtures, 15 word controls, 5 ABI1 controls, 3-unit context ABI, 12 mutants; native/driver/chip NOT_RUN
bwrap --dev-bind / / --dev /dev --proc /proc -- \
  taskset -c 10-14 nice -n 10 \
  sh tests/native/x86/run.sh /tmp/bh/x86-aien-emulated-final

Environment: emulated in environment.json. rc=0; emulated-final.log ends:

NATIVE-X86 NATIVE NOT_RUN (physical x86 execution not requested)
NATIVE-X86 EMULATED PASS (six languages built and run; native x86 NOT_RUN)
RC=0
bwrap --dev-bind / / --dev /dev --proc /proc -- \
  taskset -c 10-14 nice -n 10 \
  sh tests/native/v2/run.sh /tmp/bh/x86-aien-v2-final

Environment: v2 in environment.json. rc=1; v2-final.log has exactly one FAIL:

FAIL hoist writes 0 of x20..x26 and 3 of d8..d15: OMEGA_NATIVE_OMC2 does not hoist (omega-mv perf/omc-loop-checks)

Its final lines are exactly:

NATIVE-V2 FAIL 1
RC=1

This is the preexisting hoist baseline, not PASS. It was not suppressed, reclassified or fixed here. The same run passes all three-unit shared-context controls, single-edit controls, and the AArch64 11-mutant device conductor.

Multi-input, contexts and refusal controls

tools/native --host OUT ctxnew.om ctxput.om ctxget.om already accepts multiple units in one invocation. The fixture generates one runtime/context API, then exercises all three units against both default and explicit contexts. It checks stale/foreign handles, context ownership, live destroy, retired/quarantined slots, drop retry after forced cleanup failure, and pure-profile refusal. No second context runtime is linked and no algorithmic host implementation is introduced.

The x86 conductor kills all12 mutants, including wrong ioctl, missing MFENCE instruction structure, entry31, context generation/capacity/destruction, read-only publication, bind ownership, failed-bind retirement, quarantine guard/publication, and the newly removed exact-length guard. The latter must reach the short-count assertion with rc42 (aien-length-mutant.log), not merely crash. The fence oracle checks emitted instructions; it is not a measured WC-reordering result.

Exact ABI1 emulated oracle

A direct strict-Linux invalid-fd oracle under this pinned QEMU returned rc44 because QEMU reports ENOTTY for the unknown exact A-type requests before validating fd-1. The original diagnostic is preserved in aien-qemu-strict-ebadf-red.log; this CPU-only red check predates the namespace mandate. It ran no GPU/device client and opened no NVIDIA device.

OMEGA_AIEN_QEMU10_ORACLE is an explicit test-only selection: x86/QEMU expects exactly ENOTTY; default AArch64/Linux still expects exactly EBADF. Neither path accepts both as a fallback. aien-strace.log records exactly two calls for each of the five exact requests (ten calls total). Short/long views trap before ioctl; removing that guard is caught at the attributed rc42 assertion. No aien-gpu device was present or opened, so driver behavior remains NOT_RUN.

Historical zero-init comparator and its count correction

Gate maintenance is isolated in the required commit: gate(v2): normalize intentional span zero-init in historical baseline. Only the exact old ombr_span sp[7]; can correspond, at the same position, to the exact new ombr_span sp[7] = {{0}};. Each fixture asserts its expected count. Every other output byte, return code and stderr comparison remains unchanged.

The comparator self-test retains five refusal controls, including a different one-byte change in the same wrapper. Individual fixture counts come from explicit exports (or the one implicit export). Combined OM1 has9 wrappers. The original v2 combined set includes hoist and has14; the new x86 combined OM2 set is madd+vec+lay+one and has13. Neither set was changed to force a count.

The first new x86 run incorrectly asserted14 for that13-wrapper set and failed exactly that assertion; emulated-first-count-red.log preserves the complete rc1 run. Commit 3c8a93b corrects only the new x86 assertion/documentation to13. The final run passes. The original v2 count14 and its known NATIVE-V2 FAIL 1 stay unchanged. This is intentional gate maintenance needing Drake's review.

Verdicts