Skip to content

Accelerate integer dot products with PMADDWD - #88

Open
danieltowner wants to merge 1 commit into
dot-generic-stackfrom
dot-pmaddwd-stack
Open

danieltowner wants to merge 1 commit into
dot-generic-stackfrom
dot-pmaddwd-stack

Conversation

@danieltowner

Copy link
Copy Markdown
Contributor

Add the width-independent pmaddwd wrapper and use it for signed 16-bit dot products and widened byte inputs. Keep the existing wraparound semantics and update the performance baselines.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The int16 intrinsic path fails to compile on AVX-512F targets without AVX-512BW, breaking affected dot overloads, and direct lane-level pmaddwd tests are missing.

2 open issues
What changed in this PR

This PR accelerates integer SIMD dot products with a width-independent PMADDWD wrapper, while preserving integer wraparound semantics.

Changes:

  • Add a wrapper that multiplies signed 16-bit elements and sums adjacent products.
  • Use it for signed 16-bit and widened byte dot products with result types of 32 bits or less.
  • Update performance baselines and document the optimized paths.
File Description
test/​performance/​baselines.json Update baselines for optimized integer dot products.
include/​xvec/​x86/​x86_impl.hpp Add optimized signed 16-bit and byte-input dot overloads.
include/​xvec/​x86/​intrin.hpp Introduce the width-independent pmaddwd wrapper.
CHANGELOG.md Document the integer dot-product optimization.

Review effort: Balanced

Comment thread include/xvec/x86/intrin.hpp Resolved
Comment thread include/xvec/x86/intrin.hpp Resolved

This branch has not been deployed

No deployments
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