Skip to content

auroraustc/opt_matmul_step_by_step

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Optimize matrix multiplication step-by-step

Pre-requests

  • A Processor which supports AVX2 instruction set
  • GCC
  • Intel MKL

How to build and run

# Check whether the processor supports AVX2 instruction set
# You should see some outputs. No output means AVX2 is not supported by the processor you are using.
cat /proc/cpuinfo | grep -i avx2
# Build using g++
g++ *.cpp  -m64 -I${MKLROOT}/include -O3 -mavx2 -fopenmp -L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl
# Run the code
# ./a.out [N]
# N is the size of the matrices. Could be nothing or an integer.
# For 1024 by 1024 matrices:
./a.out
# For 2048 by 2048 matrices:
./a.out 2048

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages