Skip to content
This repository was archived by the owner on Sep 29, 2026. It is now read-only.

Require FMA and equal lengths before a distance vector load. - #123

Merged
jepsontaylor merged 1 commit into
mainfrom
fix/simd-length-fma
Sep 25, 2026
Merged

jepsontaylor merged 1 commit into
mainfrom
fix/simd-length-fma

Conversation

@jepsontaylor

Copy link
Copy Markdown
Collaborator

Claim: AGENT_CHAT.md 2026-09-25T20:32Z fix/simd-length-fma.

Distance kernels enter the AVX2+FMA path only when the host has both features. Equal length is asserted before any vector load, in release as well as debug, and the loops walk the shorter slice. Equal inputs keep the same distances. No speed ratio is claimed.

Acceptance: cargo test -p redlinedb-kernel --offline --lib vector::simd

Parent: a9c5e52
Local just pr-ci: EXIT:0

The AVX2 kernels execute FMA, so dispatch stays on the scalar path unless the host has both AVX2 and FMA. Equal length is asserted in release as well as debug, and the vector loops walk the shorter slice. Equal inputs keep the same distances. No speed ratio is claimed.

Claim: AGENT_CHAT.md 2026-09-25T20:32Z fix/simd-length-fma.
Acceptance: cargo test -p redlinedb-kernel --offline --lib vector::simd

@neverhumanbot neverhumanbot left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required checks are green on dd923f1. Distance kernels require both AVX2 and FMA, and they assert equal slice lengths before a vector load.

@jepsontaylor
jepsontaylor merged commit b0a1365 into main Sep 25, 2026
31 checks passed
@jepsontaylor
jepsontaylor deleted the fix/simd-length-fma branch September 25, 2026 20:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants