Hack: AMD Ryzen/TR/Epyc + Intel Math Kernel Library (MKL)

Interesting performance hack for Ryzen/TR CPU + MKL → “up to 250% performance gains”
(based on reddit post )

in theory it should work with Julia+MKL ;

Anybody can test / validate ?


“The method provided here does enforce AVX2 support by the MKL, independent of the vendor string result.”

Linux :

  • export MKL_DEBUG_CPU_TYPE=5

Windows:

@echo off
set MKL_DEBUG_CPU_TYPE=5
call "%MKLROOT%\bin\mklvars.bat" MKL_DEBUG_CPU_TYPE=5
julia 

see the details:
https://www.reddit.com/r/matlab/comments/dxn38s/howto_force_matlab_to_use_a_fast_codepath_on_amd/

2 Likes