Skip to content

Problems: P7 batch sweeps at 20, 50 and 100 states, run only when named - #60

Merged
mmcky merged 2 commits into
mainfrom
problems-kalman-batches-at-more-states
Nov 10, 2026
Merged

mmcky merged 2 commits into
mainfrom
problems-kalman-batches-at-more-states

Conversation

@mmcky

@mmcky mmcky commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

For #58: P7's batch sweep at 20, 50 and 100 states, so the crossover between a CPU and a GPU can be found as filters and states grow together. Phase 1 has only the two lines through that plane: 1 to 10,000 filters at 10 states, and one filter at 2 to 200 states.

File Change
problems/spec.py KALMAN_BATCH_STATES maps each batch sweep to its states: batch 10 (as now), and batch20, batch50 and batch100. The three new sweeps run 1, 10, 100, 300, 1,000, 3,000 and 10,000 filters, --quick at 10, and are marked optional. P7's memory estimate uses the sweep's states, 20 × filters × states² × the item size, so the batch and state estimates are unchanged.
problems/run_suite.py A sweep marked optional runs only when --sweeps names it, so a default run plans exactly the cells it did before.
problems/kalman.py model takes a batch sweep's states from KALMAN_BATCH_STATES, in place of K_BATCH. The model is otherwise unchanged; A's off-diagonal draws were already scaled by 1/√K.
problems/README.md A bullet under Problems on the three optional sweeps.

Checked on qe-mini1's M6 (2026-11-10, with the runs venv, output to a scratch folder and deleted):

  • --dry-run --problems kalman with the four CPU stacks plans 40 batch cells and 56 state cells, as before, and none of the new sweeps.
  • --dry-run --sweeps batch100 plans every size to 10,000 in both precisions, with nothing skipped for memory. The largest estimate is 14.9 GiB, at 10,000 filters in float64.
  • --quick --problems kalman --sweeps batch20,batch50,batch100 with the four CPU stacks ran all 24 cells, status ok.

That quick run isn't a measurement, but it sets #58's time estimate. At 100 states in float64, at 10 filters, a filter's step cost numpy 21 µs, numba 26 µs, jax-cpu 51 µs and numba-parallel 9.8 µs.

The full runs follow the merge, by #58's plan, and #58 stays open for them.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WT8bMZXaSPhPfoP4ShvCrj

For #58: batch20, batch50 and batch100 run the batch sweep at more states,
1 to 10,000 filters with 300 and 3,000 between, so the crossover can be
found as filters and states grow together. A sweep marked optional runs
only when --sweeps names it, so a default run of the suite is unchanged.
spec.KALMAN_BATCH_STATES maps each batch sweep to its states, for the
model and the memory estimate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WT8bMZXaSPhPfoP4ShvCrj
Copilot AI balanced review requested due to automatic review settings November 10, 2026 04:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.

🟡 Changes recommended

A moderate active issue remains in problems/run_suite.py where the sweep-filtering logic is overly complex and fails to handle common comma-separated inputs with whitespace, risking unintended sweeps being skipped.

1 open issue
What changed in this PR

Extends the P7/Kalman benchmark suite with opt-in batch sweeps at larger state sizes (20/50/100) to help identify CPU vs GPU crossover as both filters and states scale, while keeping default suite runs unchanged.

Changes:

  • Add KALMAN_BATCH_STATES and new optional sweeps batch20, batch50, and batch100 (expanded filter sizes) with sweep-specific memory estimation.
  • Update suite planning so sweeps marked optional are excluded unless explicitly named via --sweeps.
  • Update the Kalman model to use the sweep-mapped state count for batch sweeps and document the new sweeps in the README.
File Description
problems/​spec.py Introduces KALMAN_BATCH_STATES, defines new optional Kalman batch sweeps (batch20/batch50/batch100), and updates memory estimation to use the sweep’s state count.
problems/​run_suite.py Adjusts sweep selection logic so sweeps marked optional are skipped by default and only run when explicitly named via --sweeps.
problems/​README.md Documents the new optional Kalman batch sweeps and how to enable them when running the suite.
problems/​kalman.py Updates the Kalman model setup to derive the batch sweep state dimension from KALMAN_BATCH_STATES instead of a fixed constant.

Review effort: Balanced

Comment thread problems/run_suite.py Resolved
Copilot's review of #60: the nested condition was hard to read, and
--sweeps "batch, state" kept the space. Dry runs plan the same cells as
before by default (10 batch, 14 state), with --sweeps batch100 (14), and
with --sweeps batch,state or "batch, state" (10 and 14).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WT8bMZXaSPhPfoP4ShvCrj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants