docs: silicon-core reconnaissance report (backend/FFI/GPU audit, deliverables A–J) - #107
Merged
Merged
Conversation
…tions)
Read-only investigation of backend/native/GPU/coprocessor responsibilities in
Axiom.jl. No source, dependency or structure changes. Adds:
- docs/investigation/2026-09-26-silicon-core-recon/{README,A..J}.adoc
- repro/: Zig test files and ctypes probes against the CI-built libaxiom_zig.so
Empirically confirmed (Zig 0.15.2, ReleaseFast .so): batchnorm wrong >4096
features and SIGSEGV from 8192; pooling wrappers pass column-major memory to
row-major kernels; tanh NaN for x >= 44.5; chunking underflow at batch=5 (UB);
axiom_matmul_checked 9-16x slower than the benchmarked kernel; 44 exports vs
documented 32/36; ffi/zig does not compile.
Recommendation: defer extraction (Option D), build the runtime seam in-tree,
then supersede AcceleratorGate.jl rather than create a third package.
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
arena-ai-coding-agent
Bot
requested a review
from hyperpolymath
as a code owner
September 26, 2026 15:40
Contributor
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
hyperpolymath
approved these changes
Sep 26, 2026
hyperpolymath
approved these changes
Sep 26, 2026
hyperpolymath
disabled auto-merge
September 26, 2026 15:47
hyperpolymath
approved these changes
Sep 26, 2026
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.
Summary
Read-only engineering reconnaissance of Axiom.jl's backend / native FFI / GPU / coprocessor responsibilities, answering: does the package combine too many responsibilities, are the accelerated paths what the docs say, and should a standalone runtime package (
SiliconCore.jl/CoprocessorRuntime.jl) be extracted?This PR adds documentation and reproduction scripts only. No file under
src/,ext/,zig/,ffi/ortest/is modified; no dependency, structure or CI change. Everything is underdocs/investigation/2026-09-26-silicon-core-recon/.README.adocA-component-map.adocB-backend-status.adocC-abi-ffi-discrepancies.adocD-numerical-parity-risks.adocE-memory-performance.adocF-extraction-recommendation.adocG-api-boundary.adocH-staged-plan.adocI-not-recommended.adocJ-upstream-issues.adocctypesprobes)repro/Key findings
Empirically confirmed against the CI-built
libaxiom_zig.so(Zig 0.15.2,-Doptimize=ReleaseFast); scripts inrepro/:axiom_batchnormuses a fixed[4096]f32stack scratch (zig/src/norm.zig:143): silently wrong for 4097–8191 features, SIGSEGV from 8192. Reachable fromforward(bn::BatchNorm)whenever a Zig backend is active.backend_maxpool2d/backend_global_avgpool2dZig wrappers pass column-major memory to row-major NHWC kernels → wrong values for any N>1 or C>1.axiom_tanhreturns NaN for x ≥ 44.5 and +Inf (geluin the same file already uses the overflow-safe form).axiom_matmul_checked, which is 9–16× slower than theaxiom_matmulkernel the published benchmarks measured (512²: 284.6 ms vs 21.7 ms).batch_size = 5inparallel_layernorm/rmsnorm/batch: panics in Debug/ReleaseSafe, crashes a ReleaseFast test binary, accidentally benign in the shipped.so.TOPOLOGY.adoc,ABI-FFI-README.adoc,zig/src/axiom.zig;ffi/zigdoes not compile (export fn Axiom.jl_init()) despite being documented as "internally self-consistent".Static findings (Julia was not available in the investigation sandbox; each carries a maintainer-runnable check and is labelled
[static]): the documented production pathcompile(model, backend=ZigBackend(path))runs pure Julia unlessset_backend!is also called and the CI "accelerated" smoke test cannot detect it; every Zig wrapper silently falls back when the library is unavailable (no strict mode);AXIOM_CUDA_AVAILABLE=1asserts GPU availability without a device;precision=:float16/:mixedpaths do not do what they claim; the proof/certificate layer records no backend, kernel or ABI provenance.Recommendation
Option D — defer extraction; stabilise internal interfaces first, with an explicit exit criterion to Option B. Decisive evidence: the extraction has already been attempted once (
AcceleratorGate.jl, "extracted from Axiom.jl's backend module") and is vendored back into Axiom as dead code behind an always-falseapplicableguard with a disjoint type hierarchy.Gspecifies the minimal runtime API (requested/selected/executed backend,fallback_used, precision, device identity, kernel/ABI version,strictmode);Hsequences Phase 0 (fixes + parity tests) → Phase 1 (in-treeAxiom.Runtimeseam) → Phase 2 (evidence gate) → Phase 3 (conditional extraction superseding AcceleratorGate rather than creating a third package).How to reproduce
Notes for reviewers
79e6f48.J-upstream-issues.adoc§J.3 (open J-01/J-02/J-03 as individual issues with the repro scripts attached; then the "requested vs executed backend" epic pointing at G/H).tanhoverflow was wrong (the probe corrected it), and the batch=5 underflow is documented as UB rather than a confirmed production crash because the shipped.sohappens to be benign.