This repository was archived by the owner on Jun 4, 2026. It is now read-only.
Add accelerator (HIP) info to system summary and CLI#26
Merged
Conversation
scripts/system_info.py mixed json.dumps output with a colorized ANSI footer, so any consumer piping it to jq / json.load choked on trailing non-JSON. Add argparse with --json (JSON-only, no footer, no ANSI), and gate ANSI in default mode behind isatty() + NO_COLOR=. The summary's optimal_device only reflects PyTorch's device selection (embedding path), which misleads anyone asking "is the engine on GPU?" when the HIP CA kernel is dispatching. Extend get_system_summary() with an additive `accel` field sourced from the existing accel_info(), and have the interactive footer surface BOTH the embedding device and the CA-kernel device on separate lines. No rename of optimal_device (external consumers unchanged). Other JSON-emitting CLIs already follow this --json pattern; system_info was the outlier. - wheeler_memory/hardware.py: add accel to get_system_summary - scripts/system_info.py: argparse + --json + ANSI gating - docs/api.md, docs/gpu.md: document accel field and --json flag - tests/test_system_info.py: lock --json purity and footer presence https://claude.ai/code/session_014mNYpGjoJ8kK1DXp4SBRDY
After the 2026-05-22 per-cell crystallization probe characterized the CA substrate as synchronous Lyapunov-monotonic descent to a single global attractor — i.e. textbook Hopfield recall geometry — pin down empirically whether Wheeler beats the Hopfield baseline its mechanics resemble. Two side-by-side scripts under scripts/bench/, zero changes to core, engine, constants, or sacred files. Both reuse existing harness pieces by import (bench_reconstruction perturbation regime; recall_with_interference path). Each writes to its own versioned TSV alongside reconstruction.tsv. Experiment A — substrate (bench_substrate_vs_hopfield.py): same TEST_INPUTS (α=0.0049), same Gaussian perturbation sweep, same Pearson fidelity ≥ 0.9 recovery threshold. Wheeler CA vs centered-Hebbian Hopfield (bias correction applied because the attractors are ~77% +1). Pre-registered criterion: Wheeler capture radius strictly greater than Hopfield's. Result: Wheeler ε≤0.50 (55% recovery, 60% spurious) vs Hopfield ε≤1.00 (100% recovery, 0% spurious). Verdict: FAIL. Caveat per the plan: Wheeler is spatially local, Hopfield is all-to-all; the loss is consistent with either substrate inferiority or the standard locality tax — the test cannot distinguish them at α=0.0049. Experiment B — SCM-as-waveguide (bench_scm_ablation.py): 10 physics + 10 history facts (hippocampus encoder, intra-class corr ~0.43, cross-class ~0.07), mixed storage, physics-question recall with the full SCM vs SCM forced to all-zeros + apply_learning=False. Pre-registered criterion: gap > 0 with bootstrapped 95% CI excluding zero. Result: SCM accumulates 0/4096 cells of state during warmup even at corruption=0.7 with 3 warmup epochs; both conditions are identical at 100% recall. Verdict: FAIL_INERT_SCM. The reason is in the code: SCMGrid.update_from_recall's cold-start gate requires advantage<0 on the first call, but any successful first recall sets kappa_base>0 and the gate is closed forever after. The other update channel (self_consistency_check) is only invoked by scripts/wheeler_mmlu.py. Combined reading per the pre-registered outcome matrix: position 2 confirmed — the system is a well-engineered ternary associative memory, not (on current evidence) a system measurably more capable than Hopfield. Reconstruction-memory thesis intact; native-CA-intelligence thesis not supported by these tests. Full writeup of methodology, results, caveats, and what is/isn't ruled out in docs/reports/substrate-vs-hopfield-2026-05-29.md. - scripts/bench/bench_substrate_vs_hopfield.py: Experiment A - scripts/bench/bench_scm_ablation.py: Experiment B - substrate_comparison.tsv, scm_ablation.tsv: result logs - docs/reports/substrate-vs-hopfield-2026-05-29.md: methodology + findings https://claude.ai/code/session_014mNYpGjoJ8kK1DXp4SBRDY
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Extends
get_system_summary()to include accelerator (CA-kernel / HIP) availability alongside PyTorch device selection, and enhances thewheeler-infoCLI with JSON mode, color support, and clearer output formatting.Key Changes
wheeler_memory/hardware.py: Addedaccelfield toget_system_summary()output containing{"gpu": bool, "gpu_version": int|None}. Falls back gracefully to{"gpu": False, "gpu_version": None}if HIP is not built.scripts/system_info.py:--jsonflag for pure JSON output (no footer, no ANSI) suitable for piping tojqorjson.load()NO_COLORenvironment variable and TTY detectiondocs/gpu.md: Updated example output and added explanation of the two device lines (embedding vs. CA kernel). Documented--jsonmode andNO_COLORsupport for scripting use cases.docs/api.md: Documented the newaccelfield inget_system_summary()return value and clarified thatoptimal_devicerefers to the PyTorch/embedding device.tests/test_system_info.py(new): Added comprehensive tests covering:get_system_summary()structure andaccelfield validationImplementation Details
The
accelfield is populated by importingaccel_info()fromwheeler_memory.accelat runtime. If the import or call fails (e.g., HIP not built), the system gracefully defaults to{"gpu": False, "gpu_version": None}, ensuring shape compatibility across all hosts.The CLI now distinguishes between two independent device selections:
sentence-transformersinference (cuda/mps/cpu)These can disagree — the most common case on AMD hosts is CPU embedding with GPU CA kernel when HIP is built but PyTorch lacks ROCm support.
https://claude.ai/code/session_014mNYpGjoJ8kK1DXp4SBRDY