Integrate the bfp16ebs8 vendor experiment: XBFP container and on-metal suite (#148) - #165
Draft
aravishankar-mp wants to merge 1 commit into
Draft
Integrate the bfp16ebs8 vendor experiment: XBFP container and on-metal suite (#148)#165aravishankar-mp wants to merge 1 commit into
aravishankar-mp wants to merge 1 commit into
Conversation
…on-metal suite (#148) The XBFP flavor-1 container (magic/version/flavor/shape header, derived slot plan, checked framing) loads through a new format arm that validates the experiment's own immutable target identity and translates into the internal precompiled form, so executable construction and submission reuse the one audited path. The compiled fixture is the two-input K=512 kernel from the probe pipeline; the vendored #146 reference model doubles as a host-runnable test target that replays the recorded silicon planes. On the reference NPU: the full guest-quantized MXINT8 MATMUL lifecycle is bit-exact against the fold oracle, foreign target identities are rejected at load, and the fixture's slot plan derivation is pinned. The accumulation-order test is quarantined behind an ignore: probe P6 (bfp_p6_probe.rs, manual) proved the mac chain serial with no persistent guard bits, but its tie rounding matches no single model -- crafted exact ties break toward zero while an organic mid-chain tie broke away -- so the per-step-RNE oracle is falsified at tie-adjacent steps and the tier cannot claim bit-exactness there until P6 pins the real rule. That finding, not a green suite, is this change's most important output. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Issue #148 crate integration (design:
docs/plans/issue-148-bfp16ebs8-vendor-tier.md, on PR#161's branch): the AMD
bfp16ebs8vendor experiment'sXBFPcontainer, itsload_programarm, the vendored #146 reference model as a host-runnable test target, and an on-metal suite in
its own test file. Draft until two gates clear: PR #161 (which carries the probe pipeline
that builds the fixture and the docs this references) and the P6 question below.
The container carries only shape and payload; the slot plan is derived, never self-declared.
Loading validates the experiment's own immutable target identity — presenting any other
identity (including a TOSA target) is a relabeling attempt and is rejected — then translates
into the internal precompiled form so executable construction and submission reuse the one
audited path. Nothing is advertised: no
TosaCapabilityProviderrow, no TOSA formatacceptance, no protocol value.
Proven on the reference NPU (fail-loud lane,
1022:17f0): the full guest-quantized MXINT8MATMUL lifecycle at K = 512 is bit-exact against the fold oracle; foreign identities are
rejected at load; the fixture's derivation is pinned. The vendored model's nine silicon-fixture
tests also run on every host without an NPU.
The important finding is a falsification. The planned accumulation contract — per-step FP32
round-to-nearest-even in ascending-k order — is wrong at tie-adjacent steps. Probe P6
(
tests/bfp_p6_probe.rs, manual on-metal measurements, findings in its module doc) shows themac chain is serial with no guard bits persisting across an
X, d, −Xsequence, yet craftedexact ties break toward zero while an organic mid-chain tie broke away from zero — refuting
RNE, floor, to-odd, half-away, half-toward-zero, and every wider-precision single-rounding
model. Until P6 pins the real rule, the order-contract hardware test is quarantined behind an
#[ignore]naming the reason, and the tier claims bit-exactness only away from exact ties.Shipping the falsified oracle as a green test would have been worse than shipping no test.
Compatibility
constant is backend-local and the experiment is reachable only by presenting its own
identity.
Checklist
behavior.
bfp_experimentmodule (format constant, identity,parse/encode). Existing APIs unchanged.
unsafecode added.Verification
cargo fmt --all -- --check cargo clippy -p virtio-accel-xdna --all-targets --all-features --no-deps -- -D warnings cargo test --workspace --all-targets VIRTIO_ACCEL_HRX_LIB_DIR=/tmp/fakelib cargo clippy -p virtio-accel-xdna --all-targets --all-features --no-deps -- -D warningsOn metal (v2026.08 toolchain, HRX 2026.07.30):