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 module

vnni_intrinsics

Provides wrappers around Intel VNNI (Vector Neural Network Instructions) for dot-product and multiply-accumulate operations on integer data.

Functions​

  • ​dot_i16_to_i32_AVX2: The dot product of the two words in each int32 element of a and b plus a int32 from src.
  • ​dot_i16_to_i32_x86: The dot product of the two words in each int32 element of a and b plus a int32 from src using VNNI or AVX2.
  • ​dot_i8_to_i32_AVX2: The dot product of the four bytes in each int32 element of a and b plus a int32 from src.
  • ​dot_i8_to_i32_saturated_AVX2: The dot product of the four bytes in each int32 element of a and b plus a int32 from src.
  • ​dot_i8_to_i32_saturated_x86: The dot product of the four bytes in each int32 element of a and b plus a int32 from src using VNNI or AVX2.
  • ​dot_i8_to_i32_x86: The dot product of the four bytes in each int32 element of a and b plus a int32 from src using VNNI or AVX2.
  • ​pmaddubs: Multiplies adjacent unsigned-signed byte pairs and returns the int16 results packed as int32.
  • ​pmaddw: Multiplies adjacent signed 16-bit integer pairs and adds the products, returning int32 results.
  • ​vpdpbusd: Computes a dot product of four unsigned-signed byte pairs per int32 element using the VPDPBUSD Intel AVX-512 VNNI instruction.
  • ​vpdpbusds: Computes a saturating dot product of four unsigned-signed byte pairs per int32 element using the VPDPBUSDS Intel AVX-512 VNNI instruction.
  • ​vpdpwssd: Computes a multiply-accumulate of signed 16-bit integers using the VPDPWSSD Intel AVX-512 VNNI instruction.
  • ​vpdpwssds: Computes a saturating multiply-accumulate of signed 16-bit integers using the VPDPWSSDS Intel AVX-512 VNNI instruction.

Was this page helpful?