CPU support for SIMD

SIMD has been developing and evolving for several generations. Intel and AMD CPUs provide their own SIMD instruction sets. Throughout this tutorial, we focus on Intel SIMD instructions, so please also write your assignments(assignment-1) using Intel SIMD. If your PC uses AMD CPU, you can do your assignments using Linux/HPC servers provided by the CSE department.

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/.

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

# make sure you've installed cmake (a compilation tool)
sudo apt-get install cmake

# clone the repo locally
git clone https://github.com/Mysticial/FeatureDetector

# cd to the repo
cd FeatureDetector

# generate makefile using cmake
cmake .

# compile the program
make

# run and get the result
./FeatureDetector_main

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

Please make sure you only use the SIMD instructions supported by HPC15's CPU. The instructions supported by your own computer and Linux servers and hpc15 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 Guide. 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