Skip to content

Use QuantizeB4 in SSE4.1 Dqip16bGemmV0 ConvertB - #1133

Merged
ermig1979 merged 1 commit into
devfrom
cursor/sse41-dqip16b-quantizeb4-4b9c
Oct 27, 2026
Merged

ermig1979 merged 1 commit into
devfrom
cursor/sse41-dqip16b-quantizeb4-4b9c

Conversation

@ermig1979

@ermig1979 ermig1979 commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

SSE4.1 Dqip16bGemmV0_ConvertBf and Dqip16bGemmV0_ConvertBb now share the same QuantizeB4 helper already used by AVX2 (and AVX-512BW / NEON).

The helper clamps four float vectors to int8, accumulates the negative sum, packs the lanes, and stores them with K8_SFL_IDX. Aligned and tail K/N loops call it instead of duplicating that sequence.

Test plan

  • Release build with g++ (Base, SSE4.1, AVX2)
  • ./Test -r=.. -fi=SynetDynamicQuantizedInnerProduct16b -tt=1 -ts=1 -mt=100 — all cases passed, including SSE4.1 vs the dispatched AVX2 path and vs SynetInnerProduct32f

Shapes 333x555-444 cover both float (ConvertBf) and bfloat16 (ConvertBb) B, with K not a multiple of 4. SSE4.1 runtime is about 2.1× AVX2 and about 10× faster than the scalar base, which matches a 4-wide vs 8-wide kernel.

Open in Web Open in Cursor 

…ip16bGemmV0_ConvertBb.

Co-authored-by: igor.ermolaev <igor.ermolaev@altezza.org>
Copilot AI balanced review requested due to automatic review settings October 27, 2026 08:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@ermig1979
ermig1979 merged commit 63f06ea into dev Oct 27, 2026
2 checks passed
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.

3 participants