Skip to content

rules(benchmark, rust): observer pinning for agents, no commits during a run, lda padding and the held worker group - #24

Merged
shinaoka merged 3 commits into
mainfrom
rules/measurement-observer-and-lda
Oct 28, 2026
Merged

shinaoka merged 3 commits into
mainfrom
rules/measurement-observer-and-lda

Conversation

@shinaoka

@shinaoka shinaoka commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Lessons from the faer fork's values-only SVD work of 2026-10-23 (perf/svd-dqds, worklogs 2026-10-23-blocked-bidiag.md and 2026-10-23-dqds-shift.md; campaign runs 20261023T1* in faer-benchmark).

rules/benchmark/measurement.md

  • The agent is a process too: pin the agent's own process and other agents (taskset -apc, separate command, then start the recorder fresh); the toolkit's observer_audit --confine. The Claude Code process started with affinity 0-23 although its login shell was pinned; record_run.py refused on another agent (codex) once.
  • No commit or edit in any measured repository while a run is in flight: the recorder compares HEAD and clean state between process sets; a worklog commit in the library checkout nearly ended a run (recovered by detaching HEAD at the recorded revision).
  • Build the harness only through its build script: a plain cargo test re-resolved Cargo.lock to the registry crate, a filtered diff hid the version lines, and the next recording stopped at the patch guard — a two-hour restart.

rules/rust/performance.md

  • A work copy's leading dimension must not be a multiple of 1 KiB (L1 set aliasing; bidiag 512 at 8T 18.6 -> 15.3 ms with 64 bytes of padding per column; every benchmark shape is a power of two).
  • Rows of a column-major matrix are strided operands: gather once, work contiguous, scatter once.
  • A caller with a thread budget holds a faer team (faer::team::with_team(width, |par| ...)) around its calls and passes par inside; the library does not create it (maintainer's decision, 2026-10-23); 25.5 -> 19.2 ms at 512, 8T.
  • Inside the closure, other parallel work runs on the same team, not through a raw rayon iterator that competes with the held members.

🤖 Generated with Claude Code

@shinaoka

Copy link
Copy Markdown
Member Author

Added rules/common/performance.md → Optimising Against Proprietary Software: the vendor is a yardstick, not a source. Allowed: public-API timing, public docs, hypotheses tested on our code, licence-compatible published algorithms with citation. Not allowed: disassembly/decompilation/tracing, profiler sampling into vendor internals, reading vendor source, carrying over constants learned from it, uncredited translation of a reference implementation. Provenance recorded in the worklog and ledger row. (maintainer's request, 2026-10-24)

shinaoka and others added 2 commits October 29, 2026 07:08
… a run, the lock-file trap; lda padding, strided rows, the held worker group

From the faer fork's SVD work of 2026-10-23: a measurement that stopped because
the agent committed a worklog in the measured checkout, a two-hour restart after
a plain `cargo test` re-resolved the harness lock, the observer audit refusing
another agent's process; and three performance findings that are not faer's
alone — a 1 KiB-multiple leading dimension aliasing L1 sets, rows as strided
operands, and the worker group a thread-budget caller holds around faer, with
the raw-rayon starvation that follows when a library mixes the two.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ary library is the yardstick

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@shinaoka
shinaoka force-pushed the rules/measurement-observer-and-lda branch from 811bcf9 to c599275 Compare October 28, 2026 22:08
@shinaoka
shinaoka enabled auto-merge (squash) October 28, 2026 22:27
@shinaoka
shinaoka merged commit a3fe9df into main Oct 28, 2026
1 check passed
@shinaoka
shinaoka deleted the rules/measurement-observer-and-lda branch October 28, 2026 22:28
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.

1 participant