Phase 2: CPU core-count scaling sweep - #89
Merged
neuromechanist merged 5 commits intoJul 8, 2026
Merged
Conversation
Member
Author
Review summary (4 agents, Sonnet) + complete cross-platform dataCode review came back clean on correctness except one real issue, now fixed; test + silent-failure agents added coverage/robustness findings, all addressed in the follow-up commits:
Complete results: channel x core, f64 + f32, both machinesFull grid run on hallu (Intel 32c + RTX 4090) and Mac (Apple 14c + MLX/MPS); see
Note: comment-analyzer agent stalled; docs self-reviewed against the measured numbers. |
neuromechanist
merged commit Jul 8, 2026
6410e04
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
--threadsCPU core-count scaling sweep to the dimension-sweep harness: the CPUbackends (torch-cpu via
set_num_threads, numpy viathreadpoolctl, native-fortran viaOMP_NUM_THREADS) run at each thread count; GPU backends run once. Answers "do cores catchthe GPU?"
Closes #86
Part of epic #84
What changed
--threads N1,N2,...: sweeps thread counts for CPU backends (_is_cpugates which);each run records a
threadsfield._run_torch/_run_numpy/_run_fortrangained a unifiedthreadsknob threaded through_run_backend._report: a CPU-scaling block (threads x backend, per channel count) with a GPU referenceline; the summary table now shows the fastest CPU thread count. Backward-compatible with
thread-less JSONs.
verbose=False; itsstdout/stderr are redirected to a sink during the fit (timing via
perf_counter, unaffected).threadpoolctladded as a dependency (in-process BLAS thread control for numpy).Results (hallu: RTX 4090, 32-core x86; real ds002718; see
.context/issue-84/phase2_cpu_scaling.md)Fastest CPU vs CUDA f64 (ms/iter): native-fortran 3.16 / 10.0 / 12.1 / 24.2 at 16/32/48/70ch
vs CUDA 34 / 35 / 35 / 38.
the RTX 4090 at every EEG channel count (~11x at 16ch down to ~1.6x at 70ch).
threads, never catches the GPU.
Test plan
pyAMICA/tests/test_dimsweep_threads.py:_is_cpuclassification (CPU vs GPU backends) +full-registry coverage.
ruffclean.backends. Report renders the scaling tables + GPU reference.
Caveats
trust the 48/70ch scaling curve.