Skip to content

cost: measured Zen2 team row for x86_64-avx2, anchors 2 to 64 (#6 stage 2); threadteam 0.1.2 - #8

Merged
shinaoka merged 3 commits into
mainfrom
feat/6-zen2-row
Oct 29, 2026
Merged

shinaoka merged 3 commits into
mainfrom
feat/6-zen2-row

Conversation

@shinaoka

Copy link
Copy Markdown
Member

Closes #6 (stage 2, proposal 3). Stage 1 is #7, released as 0.1.1. Item 4, where faer drops team_section_cost, is a separate faer PR that follows this release.

Summary

  • for_class(HostClass::X86_64Avx2) gets a measured team row with ten anchors (widths 2 to 64). The data is from the comment on WidthCosts is flat above width 6: extrapolate conservatively and accept measured anchors up to 64 #6 (2026-10-29):

    • host broccoli: AMD EPYC 7702P (Zen2), 64 cores, SMT off, boost off, governor performance;
    • pool 64 pinned to CPUs 0-63, threadteam 0.1.0;
    • the Linux port of benches/dispatch_cost.rs in faer-benchmark;
    • statistic team/load10us-minus-10us, the same quantity as the existing rows, rounded to the nearest ns.
    width 2 4 6 8 12 16 24 32 48 64
    team, ns 1423 1992 2329 2738 3558 4076 4292 4838 6402 9333

    The raw output is checked in as docs/design/thresholds-data/raw/broccoli-dispatch-20261029.csv.

  • The plain kinds (in pool, outside) keep the generic row on purpose. The run's plain-token numbers were a control and are not promoted to the row.

  • What the row does not claim (docs/design/thresholds.md section 3.7):

    • The dispatch row is measured, but the consumer crates' rates for x86_64-avx2 are still generic: a heuristic exception to "one machine per class". The for_class rustdoc and placement.md now name it.
    • The class covers small AVX2 hosts too, and their width-2 team floor goes from 9 to 4.3 us. The row is a representative class default; PoolBuilder::dispatch_costs overrides it.
    • The intermittent ~0.62 ms section that faer#91 saw on a fresh team entry is not attributed and is not part of the steady-state row.
  • Measured rows are now const items (anchored). An invalid anchor list fails the build instead of reaching the runtime expect from stage 1.

  • threadteam 0.1.2 for the approved patch release.

Tests

tests/dispatch_cost.rs::avx2_class_has_the_measured_zen2_team_row checks:

  • the ten anchors;
  • width 10 interpolates to 3148 ns;
  • width 128 extrapolates to 18666 ns;
  • in pool and outside equal the generic row, including width 64.

x86_64-avx2 is removed from the generic-row loop.

Verification

The AGENTS.md pre-push checklist passes locally:

  • cargo fmt --check
  • cargo clippy (all features and no default features, both with -D warnings)
  • cargo test (default, all features and no default features)
  • loom loom_park
  • cargo deny check bans
  • scripts/check-no-public-rayon.sh
  • cargo doc

Independent pre- and post-implementation reviews (gpt-6.1-sol) were done. The pre-review's two IMPORTANT points (mixed provenance, small hosts) are documented as above, and the post-review's minor wording points are fixed.

🤖 Generated with Claude Code

shinaoka and others added 3 commits October 29, 2026 10:12
…ge 2)

broccoli (AMD EPYC 7702P, Zen2, 64 cores), pool 64, this crate's
dispatch_cost bench, team/load10us-minus-10us at widths 2..64. The plain
kinds keep the generic row. The class mixes a measured dispatch row with
the consumer crates' generic rates; documented as a heuristic exception.
Measured rows are now const items, so an invalid anchor list fails the
build instead of an expect at run time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shinaoka
shinaoka merged commit 416198e into main Oct 29, 2026
7 checks passed
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.

WidthCosts is flat above width 6: extrapolate conservatively and accept measured anchors up to 64

1 participant