Skip to content

test: count multi-worker allocation windows at steady state (#321) - #322

Merged
shinaoka merged 1 commit into
mainfrom
fix/321-warm-every-worker
Oct 18, 2026
Merged

shinaoka merged 1 commit into
mainfrom
fix/321-warm-every-worker

Conversation

@shinaoka

Copy link
Copy Markdown
Member

Closes #321.

The process-wide allocation counters in strided-basic/tests/alloc_matrix.rs, strided-fused/tests/serial_specialization_alloc.rs and strided-kernel/tests/copy_plan_alloc.rs failed intermittently on macOS. Two failures were seen on #320, a version-only PR: the fused two-worker replay allocated 1, and the zip_reduce contiguous two-worker window allocated 2.

Cause: a pool worker that the single warm-up never scheduled pays one-time first-touch costs the first time it picks up a split. Thread-local registration allocates on macOS. This is not a per-call allocation.

Fix: each multi-worker window runs three times and reports the minimum. A per-call allocation shows up in every round, so the steady-state zero contract is unchanged. Thread-local (serial) windows are untouched.

Local: the three tests pass, with and without parallel.

🤖 Generated with Claude Code

The process-wide counters in the strided-basic, strided-fused and
strided-kernel allocation tests failed intermittently on macOS (1-2
allocations). A pool worker that the warm-up never scheduled pays one-time
first-touch costs (thread-local registration allocates on macOS) when it first
picks up a split. Each multi-worker window now runs three times and reports
the minimum. A per-call allocation still shows up in every round, so the
steady-state contract is unchanged.

Closes #321.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Repository rules review

Repository rules review (13f8165ade2e15db24526069df1ac971687beb67...9d80d567feba1f2a0af5b80a74fd8276d2359199)
Verdict: pass
Findings:
- [warn] llm-skipped (External LLM Review) <unknown>: External LLM review was skipped
  External LLM review is permanently disabled; deterministic checks only.

@shinaoka
shinaoka merged commit 3c9171f into main Oct 18, 2026
10 checks passed
@shinaoka
shinaoka deleted the fix/321-warm-every-worker branch October 18, 2026 00:49
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.

Flaky on macOS: strided-fused two_worker_replay_does_not_allocate_above_threshold allocates 1

1 participant