undertherain / benchmarker

modular framework for [not only] deep learning performance benchmarking
http://blackbird.pw/performance
Mozilla Public License 2.0
9 stars 5 forks source link

add gemm and batchmatmul, used intel mkl cblas_sgemm, oneDNN dnnl_sge… #165

Closed simon2 closed 3 years ago

simon2 commented 3 years ago

added files in kernels/gemm

I added folder mkl and oneDNN in kernels/gemm, both of these two folders contains a main.cpp. the one in mkl is a normal gemm implemented by intel MKL cblas_sgemm, and the one in oneDNN is a normal gemm implemented by dnnl_sgemm function of intel oneDNN.

added files in kernels/batchmatmul

I added args.hpp for data initialization for bmm at kernels/batchmatmul. I also added folder mkl and oneDNN in kernels/batchmatmul. main.cpp in batchmatmul/mkl is an intel MKL cblas_sgemm inside a OpenMP for-loop implementation. dnnl.cpp in batchmatmul/oneDNN is an intel oneDNN dnnl_sgemm inside a OpenMP for-loop implementation. matmul.cpp in batchmatmul/oneDNN is an intel oneDNN matmul primitive implementation, which do not have a outside omp-for-loop. example_utils.hpp in batchmatmul/oneDNN is just used for matmul.cpp, which is directly copied from the example code that oneDNN give us.