Repository navigation
pm_stats: vertical byte accumulator probe arm - #440
Merged
Merged
Conversation
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
AdaWorldAPI
marked this pull request as ready for review
November 25, 2026 16:39
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
AdaWorldAPI
added a commit
that referenced
this pull request
Nov 25, 2026
…ials pm_stats: S/A over the existing masked SAD word; correct #440's "no such word"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #439. Its findings note named a vertical byte-sum accumulator as the missing piece. This adds one as a probe arm, built only from existing
ndarray::simdwords. No new primitive, API or layout.What.
sum_abs_verticalwidens each masked magnitude block intoU16x32partials and reduces horizontally once per 128 blocks. A tile of 128 is the bound: each block adds up to 2 × 255 to everyu16lane, so the worst case is2 × 255 × 128 = 65_280.Tests. One new oracle test (12/12 green) covers:
Disable run: with a tile of 129 the bound case wraps and the test fails.
Measured for S and A together, 50% selection, in ns per 64 lanes. Two runs per tier on a shared host:
On AVX-512 the vertical form is 20–27% faster. On AVX2 it is no better, and usually worse, because the
U16x32widen and add each run as two halves. A vertical accumulator is therefore a choice for each backend, not a rule for all of them.Not built: a
vpsadbwthat returns itsU64x8partials, which would avoid the widening on both tiers. No such word exists today.Findings are recorded in
.claude/knowledge/pm-stats-probe.md.Generated by Claude Code