Repository navigation
feat(autoresearch): --wave2d-perf <W>x<H> host flag (refs #3122 A1 / #3113 Task 1) - #3134
Conversation
…1 / #3113 Task 1) A1 of meta #3122. Wires the device-side wave2dPerf (#3116) + perfProbe* (#3118) RPCs (refactored behind fl::wave_perf::* in #3120) into a single host-driven measurement pass. bash autoresearch esp32s3 --wave2d-perf 64x64 Sequence per platform run: 1. perfProbeMemcpy — SRAM throughput, MB/s. 2. perfProbeNop — cycle calibration, us/iter. 3. perfProbeRepeat — wave2dPerf reproducibility, std_dev_pct. >= 5% stamps results UNTRUSTED. 4. wave2dPerf x 4 — { FivePoint, NinePointIsotropic } x { compute, loads_only }. The loads_only/compute gap isolates memory cost from compute cost (critical for ESP32-S3 per #3114 / #3117 PSRAM analysis). Output: per-RPC live progress + final JSON dump with structured results { grid, probes, bench, untrusted, untrusted_reasons }. Naming note: per #3124, future perf-related flags use the --perf-XX prefix convention. This flag uses the original --wave2d-perf name per explicit user direction in this session ("don't fix this now, just file an issue") — #3124 tracks the prefix-rename pass for a future PR. Args dataclass + RunContext extended with the new field; existing test fixture updated to construct both with the new defaults. All 48 ci/tests/test_autoresearch_phases.py tests pass. Refs #3122 A1, #3113 Task 1.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAdds a ChangesWave2D Performance Benchmark Mode
Sequence Diagram(s)sequenceDiagram
participant CLI as CLI / parse_args
participant phases as phases.py
participant rpc as RpcClient
participant device as Device
CLI->>phases: --wave2d-perf WxH
phases->>phases: validate W,H in [4,1024]
phases->>phases: set RunContext.wave2d_perf_grid=(W,H)
phases->>rpc: connect to device
rpc->>device: perfProbeMemcpy
device-->>rpc: result
rpc->>device: perfProbeNop
device-->>rpc: result
rpc->>device: perfProbeRepeat
device-->>rpc: std_dev_pct
note over phases: untrusted=True if std_dev_pct > threshold
loop each stencil × mode
rpc->>device: wave2dPerf(stencil, mode)
device-->>rpc: bench result
end
phases->>phases: print summary + JSON
phases->>rpc: close (finally)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
A1 of meta #3122. Wires the device-side
wave2dPerf(#3116) +perfProbe*(#3118) RPCs into a single host-driven measurement pass viabash autoresearch <board> --wave2d-perf <W>x<H>.Sequence per run
perfProbeMemcpy— SRAM throughput in MB/s.perfProbeNop— cycle calibration in us/iter.perfProbeRepeat— wave2dPerf reproducibility.std_dev_pct >= 5stamps results UNTRUSTED.wave2dPerf× 4 — {FivePoint, NinePointIsotropic} × {compute, loads_only}.The loads_only/compute gap isolates memory cost from compute cost — critical for ESP32-S3 PSRAM analysis (cf. fix(wave): switch WaveSimulation2D_Real grids from vector_psram to SRAM (closes #3114) #3117).
Output
Live progress per RPC + final JSON dump with structured
{ grid, probes, bench, untrusted, untrusted_reasons }.Naming
Per #3124, future perf-related flags use the
--perf-XXprefix convention. This flag uses the original--wave2d-perfname per explicit user direction in this session ("don't fix this now, just file an issue"). #3124 tracks the prefix-rename pass.Files
ci/autoresearch/args.py—wave2d_perf: str | Nonefield +--wave2d-perf WxHargparse.ci/autoresearch/context.py—wave2d_perf_grid: tuple[int, int] | Noneon RunContext.ci/autoresearch/phases.py— grid-spec parsing, dispatch mode check,_run_wave2d_perf_tests(ctx)(~180 lines).ci/tests/test_autoresearch_phases.py— extend_make_argsand_make_run_contextfixtures.Validation
bash lint— clean.uv run pytest ci/tests/test_autoresearch_phases.py— 48/48 pass.uv run python -c "from ci.autoresearch.args import Args; print(Args.parse_args(['--wave2d-perf', '64x64', '--skip-lint', 'esp32s3']).wave2d_perf)"→64x64(parses correctly).Refs #3122 A1, #3113 Task 1.
Summary by CodeRabbit
Release Notes
New Features
--wave2d-perfcommand-line option to enable Wave2D performance benchmarking with configurable grid dimensions. Includes memory and computation profiling with stability tracking.Chores