Skip to content

Process two AVX2 columns in Dqip16bGemmV0 ConvertB - #1134

Merged
ermig1979 merged 1 commit into
devfrom
cursor/avx2-dqip16b-convert-double-j-29e4
Oct 27, 2026
Merged

ermig1979 merged 1 commit into
devfrom
cursor/avx2-dqip16b-convert-double-j-29e4

Conversation

@ermig1979

@ermig1979 ermig1979 commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

AVX2 Dqip16bGemmV0_ConvertBf and Dqip16bGemmV0_ConvertBb now walk j two SIMD widths at a time, matching the SSE4.1 kernels. Each iteration handles 2 * F columns (16), writing the second block at dst + aK * F, then falls through to the existing single-width and tail loops.

Test plan

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

Shapes 333x555-444 cover float (ConvertBf) and bfloat16 (ConvertBb) B, with K not a multiple of 4 and N not a multiple of 16, so the double-j loop, the single-F loop, and the N tail all run. AVX2 forward time is about 2.1× faster than SSE4.1 and about 21× faster than the scalar base. Against the previous single-j AVX2 kernel the full inner product stays within run-to-run noise, because the int8 GEMM dominates ConvertB.

Open in Web Open in Cursor 

…_ConvertBb.

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

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 b8a76a4 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