Skip to content

Add dot product computation between two quantized vectors#37250

Merged
vekterli merged 1 commit into
masterfrom
vekterli/quantized-lhs-rhs-dot-product
Jun 19, 2026
Merged

Add dot product computation between two quantized vectors#37250
vekterli merged 1 commit into
masterfrom
vekterli/quantized-lhs-rhs-dot-product

Conversation

@vekterli

Copy link
Copy Markdown
Member

@havardpe please review

This is more efficient than explicitly dequantizing the vectors (and then running a float32 dot product) since it does not involve any inverse rotations. Vectors must have been quantized using the logically same quantizer and using InnerProduct mode for the output to make sense.

Same const-ness/thread-safety caveats apply as other quantizer functions due to the current need for scratch space for unpacking of bits.

This is more efficient than explicitly dequantizing the vectors
(and then running a float32 dot product) since it does not involve
any inverse rotations. Vectors must have been quantized using the
_logically_ same quantizer, using `InnerProduct` mode.

Same `const`-ness/thread-safety caveats apply as other quantizer
functions due to the current need for scratch space for unpacking
of bits.
@vekterli vekterli requested a review from havardpe June 18, 2026 15:52
@vekterli vekterli merged commit 78cb90a into master Jun 19, 2026
3 checks passed
@vekterli vekterli deleted the vekterli/quantized-lhs-rhs-dot-product branch June 19, 2026 09:22
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.

2 participants