IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Mojo function

vpdpwssd

def vpdpwssd[width: SIMDLength, a_type: DType, b_type: DType, c_type: DType](src: SIMD[c_type, width], a: SIMD[a_type, (width * SIMDLength(2))], b: SIMD[b_type, (width * SIMDLength(2))]) -> SIMD[c_type, width]

Computes a multiply-accumulate of signed 16-bit integers using the VPDPWSSD Intel AVX-512 VNNI instruction.

Multiplies pairs of adjacent signed 16-bit integers from a and b, accumulates the 32-bit products into src, and returns the result.

Parameters:

  • ​width (SIMDLength): Number of int32 output elements (4, 8, or 16).
  • ​a_type (DType): DType of the a operand (int16).
  • ​b_type (DType): DType of the b operand (int16).
  • ​c_type (DType): DType of the accumulator; must be int32.

Args:

Returns:

SIMD[c_type, width]: Updated int32 accumulator after multiply-add.

Was this page helpful?