fix(linalg): preserve half-kernel fallback on AVX-512 hosts - #8877
Open
lance-gatefixer[bot] wants to merge 1 commit into
Open
fix(linalg): preserve half-kernel fallback on AVX-512 hosts#8877lance-gatefixer[bot] wants to merge 1 commit into
lance-gatefixer[bot] wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
✅ Gate recommendation: approve.
The exclusive-tier fallback is fixed at the right boundary: native kernels remain preferred, each half type requires its emitted fallback ISA, and scalar remains the safe default. The testable selector covers the build/tier matrix, while the newly reachable path preserves the existing f16 accuracy and equal-length FFI contracts.
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.
Root cause
SIMD_SUPPORTreports one exclusive tier. AnAvx512FP16host therefore never reaches match arms limited toAvx2 | Avx512, and falls through to scalar f16/bf16 implementations whenever the optional Sapphire Rapids C object could not be compiled—even though the fallback x86 object is present.Fix
1e-6f16 L2 accuracy contract with lane-partitioned AVX2 reductions.Validation
cargo test --profile ci -p lance-linalg --lib --features fp16kernels(470 passed, 1 ignored)cargo test --profile ci -p lance-linalg --lib f16 --features fp16kernels(34 passed, 1 ignored)cargo clippy --all --tests --benches -- -D warningscargo clippy -p lance-linalg --all-targets --features fp16kernels -- -D warningscargo fmt --all -- --checkFixes #8876