Phase 1: Native-Fortran adapter + CUDA host setup - #88
Merged
neuromechanist merged 4 commits intoJul 8, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feature/issue-84-epic-xplat-benchmark #88 +/- ##
=========================================================================
+ Coverage 79.03% 79.44% +0.40%
=========================================================================
Files 14 14
Lines 1975 1975
Branches 337 337
=========================================================================
+ Hits 1561 1569 +8
+ Misses 310 301 -9
- Partials 104 105 +1 🚀 New features to boost your workflow:
|
Member
Author
Review summary (4 agents, Sonnet)Ran code, tests, silent-failure, and comment reviews. Code correctness: clean (byte order, shim ABI, regex, param ordering all verified against real data/hardware). Addressed all actionable findings in b2df278: Silent failures
Test coverage (all error-guard paths were previously untested)
Comment/doc accuracy
Full suite: 10 passed (both with and without a native binary); ruff + shellcheck clean. |
neuromechanist
merged commit Jul 8, 2026
dfea077
into
feature/issue-84-epic-xplat-benchmark
7 checks passed
This was referenced Jul 8, 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
Adds a
native-fortran-f64backend to the Phase B dimension-sweep harness(
benchmarks/benchmark_dimsweep.py) that times anamica15compiled from source, plus across-platform build (
benchmarks/fortran/). First piece of epic #84: an honestnative-Fortran reference-timing row, on both the x86 CUDA host and Apple Silicon.
Closes #85
Part of epic #84
What changed
_run_fortranadapter: writes a real subset as a float32 column-major.fdt, renders amatched
input.param(n_mix=3, pdftype=0, do_newton off, block_size 512, full fixed-iterbudget), runs the binary, and times it from amica's own per-iteration
out.txtstamps(startup-immune: after MPI init / data load / PCA / sphering). Registered in
_BACKENDS;available only when a native binary exists (so CI / Apple-only checkouts are unaffected).
benchmarks/fortran/build_amica.sh+vmath_shim.c: cross-platform native build.amica15.f90targets ifort + MKL, so a plain gfortran build needs three fixes, applied to abuild copy (never the tracked reference source):
-cpp(skip the MKL#include), aportable
random_seedseed size, and a libm shim for AMD LibM'svrda_exp/vrda_log.Built clean on macOS arm64 (gfortran 16) and Ubuntu 24.04 x86_64 (gfortran 13).
benchmarks/fortran/README.md(host setup, timing method + 10 ms resolutioncaveat, portability notes), dimsweep README/docstring updated,
.context/issue-84/.Test plan
pyAMICA/tests/test_fortran_adapter.py(real committed data, NO MOCKS):.fdtround-trip vsthe canonical
load_data_file(locks the column-major convention), channel-subset round-trip,out.txtparser (200 iters, LL), param rendering, and an end-to-end smoke that runs a nativeamica (skipped unless a binary is present /
AMICA_FORTRAN_BINis set).x86 (hallu) binary. Real dimsweep on hallu (RTX 4090): native-fortran-f64 12.07 ms/it @32ch,
44.83 @70ch vs torch-cuda-f64 34.88/38.61 and torch-cpu-f64 217/226; LL agrees ~2 digits.
ruff check+ruff formatclean;shellcheckclean; full suite collects (154 tests).Notes / caveats
and documents the floor (use per-iter >> 10 ms, i.e. the 70-ch size).
--threadsCPU-scaling sweep (Phase 2 Phase 2: CPU core-count scaling sweep #86); full grid + CUDA multi-model report(Phase 3 Phase 3: Full matrix + CUDA multi-model cross-platform report #87).