Repository navigation
Keep the strided BF16 tile GEMM's fallback tier to its own contract - #415
Merged
Merged
Conversation
On hosts without AMX or AVX-512 BF16, two calls the strided entry accepts panicked in the decode+FMA tier: an A buffer longer than 16*K at stride K (the polyfill requires exactly 16*K elements), and K = 0 with a nonzero stride (chunks_exact_mut(0)). The fallback now passes only the 16 rows it uses and returns early on K = 0, as the tile tiers already do. It is a function of its own so its tests run on any host. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMMWgnUU9g7Ldyn6sbk
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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. |
This was referenced Nov 8, 2026
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.
Problem
bf16_tile_gemm_16x16_packed_strided(#414) accepts any A buffer of at least15·stride + Kelements, and any K that is a multiple of 32, including 0. On hosts without AMX or AVX-512 BF16, two calls that satisfy those checks panicked in the decode+FMA tier:16·Kat strideK. The fallback passed the whole slice to the polyfill, which requires exactly16·Kelements.K = 0with a nonzero stride. Gathering the rows calledchunks_exact_mut(0).The AMX and AVX-512 tiers already handle both cases. Codex reported both findings on #414 after it had merged.
Change
fallback_vnni, a function of its own, so its tests run on any host. A host with a tile tier otherwise never reaches it.fallback_vnnipasses only the 16 rows it uses,&a[..16·K], to the polyfill.K = 0, leaving C unchanged, as the tile tiers do.Validation
chunks_exact_mut(0)panic. Both pass after the fix.bf16_tile_gemmtests pass on an AMX host.cargo clippy --lib --tests -- -D warningsand the facet-stride guard (--diff origin/master) are clean.Generated by Claude Code