CPU support for SIMD

SIMD has been developing and evolving for several generations. Throughout this tutorial, we focus on x86-64 SIMD instructions, so please also write your assignments (assignment-1a) using x86-64 SIMD on Intel or AMD x86 CPUs. If your computer uses ARM CPU (like recent Mac with Apple Silicon), you can do your assignments using Linux servers provided by the CSE department.

circle-info

Other architectures may have their own SIMD implementations, like ARM's NEON and SVE, as well as RISC-V's V and P extensions. They may program differently, but they share the same basic principles with x86's SIMD. So once you have learned how to program on Intel/AMD CPUs, you can easily transfer the knowledge to other CPUs as well.

Intel has developed several generations of SIMD instruction sets, you can find all these instructions and guides on https://software.intel.com/sites/landingpage/IntrinsicsGuide/arrow-up-right.

SIMD instruction sets provided by Intel

To find which SIMD instruction sets are supported by your CPU, compile and run this programarrow-up-right using the following commands:

To ensure fairness, we will grade your assignments on the HPC15 provided by the CSE department, which supports a lot of (not all) SIMD instructions including:

  • MMX

  • SSE

  • SSE2

  • SSE3

  • SSSE3

  • SSE4.1

  • SSE4.2

  • AVX

circle-info

Please make sure you only use the SIMD instructions supported by HPC15's CPU. The instructions supported by your own computer, CSE's public Linux servers, and grading servers may be different. The simplest way is to compile and test your program on the server.

For more information about different SIMD instruction sets, please refer to Intel Intrinsic Guidearrow-up-right. Roughly, MMX supports operations on integers, SSE supports single-precision floats and SSE2 supports double-precision floats and others supplement even more features.

Last updated