BaseKit-code-samples icon indicating copy to clipboard operation
BaseKit-code-samples copied to clipboard

matrix_multiply sample for MKL error

Open pqLee opened this issue 6 years ago • 1 comments

I want to compare the performance for different version of matrix_multiply. It works well for "matrix.icc/matrix.gcc/matrix.clang/matrix.dpcpp". But when I run "matrix.mkl", I got an error below: ''' ===== Error: Change matrix kernel to 'multiply5' for compilation with MKL ===== ''' How to change matrix kernel? Thanks

pqLee avatar Nov 28 '19 10:11 pqLee

multiply.h file is defining a global micro MULTIPLY which is used in file thrmodel.cpp, in thrmodel.cpp function(kernel) call for mkl is there.

MULTIPLY micro is set to multiply1, and calling multiply1 function for all versions(gcc, icc, clang, mkl, mic) of executions, but the function(kernel) call for mkl should be multiply5 Update multiply.h: remove the line “#define MULTIPLY multiply1” add the following lines: #ifdef USE_MKL #define MULTIPLY multiply5 #else #define MULTIPLY multiply1 #endif

Now, you can run for all versions.

Abhishek-Intel avatar Dec 05 '19 09:12 Abhishek-Intel