Skip to content

rules(rust): CPU parallelism audit items from the placement design - #25

Merged
shinaoka merged 1 commit into
mainfrom
rules/cpu-parallelism-conventions
Oct 25, 2026
Merged

shinaoka merged 1 commit into
mainfrom
rules/cpu-parallelism-conventions

Conversation

@shinaoka

Copy link
Copy Markdown
Member

The CPU placement conventions settled in tensor4all-meta become audit items.

  • rules/rust/performance.md: "Threading Principles" becomes "CPU Parallelism".
    • It links the design as the source of truth: core-boundary-and-execution-ownership.md "Where placement is decided" (rules 1 to 13, "faer and spindle"), plus cpu-placement-token.md and spindle.md. These come from design: one splittable placement token for CPU fan-out tensor4all-meta#41, #43, #44 and #45.
    • Ten checkable items follow, most with the tool that checks them:
      • fan-out only through the token (cargo deny, clippy disallowed-methods);
      • no ambient pool (global_pool_unstarted() test);
      • decide before entering a pool;
      • budgets only shrink;
      • one source of truth for policy;
      • vendor libraries through Exec::external;
      • spindle confined to t4a-faer, with the tlinalg batch shapes (cargo deny, wrappers = t4a-faer);
      • no Rayon type in public signatures (cargo public-api);
      • barrier-bearing kernels use broadcast;
      • concurrency claims backed by the ledger.
    • Until a repository runs on strided_exec::Exec, an audit reports each departure as a migration gap rather than a defect.
  • The four previous threading bullets are merged into these items (single source of thresholds, serial short-circuit, no ambient pool, provider-owned BLAS/OpenMP teams).
  • rules/common/performance.md, rules/index.md and the tensor4all-rules-audit skill point to the section.

Docs only.

🤖 Generated with Claude Code

Replaces the generic threading principles with audit items that point at
tensor4all-meta's placement design (rules 1 to 13, faer and spindle):
fan-out only through strided_exec::Exec, no ambient pool, budgets only
shrink, vendor libraries through Exec::external, spindle confined to
t4a-faer, no Rayon type in public signatures, ledger-backed concurrency
claims. Unmigrated repositories report departures as migration gaps.
The audit skill and the common performance rule point to the section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shinaoka
shinaoka merged commit b1e664a into main Oct 25, 2026
1 check passed
@shinaoka
shinaoka deleted the rules/cpu-parallelism-conventions branch October 25, 2026 01:05
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