diff --git a/microbenchmarks/dgemm/src/CMakeLists.txt b/microbenchmarks/dgemm/src/CMakeLists.txt index 34c97bb3..136e01b7 100644 --- a/microbenchmarks/dgemm/src/CMakeLists.txt +++ b/microbenchmarks/dgemm/src/CMakeLists.txt @@ -18,7 +18,7 @@ LANGUAGES C) site_name( SITENAME ) if ( NOT DEFINED BLAS_NAME ) - message( SEND_ERROR "BLAS NAME MUST BE SPECIFIED: cblas, mkl, essl, cublas, libsci or raw") + message( SEND_ERROR "BLAS NAME MUST BE SPECIFIED: cblas, blis, mkl, essl, cublas, libsci or raw") endif() string( TOUPPER ${BLAS_NAME} BLAS_NAME_UPPER ) @@ -40,6 +40,9 @@ elseif( CMAKE_C_COMPILER_ID MATCHES "Intel" ) elseif( CMAKE_C_COMPILER_ID STREQUAL "Cray" ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp") set( CMAKE_C_FLAGS_RELEASE "-O3") +elseif( CMAKE_C_COMPILER_ID STREQUAL "Clang" ) + set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp") + set( CMAKE_C_FLAGS_RELEASE "-O3 -march=native -ffast-math -funroll-loops") endif() if (CMAKE_BUILD_TYPE STREQUAL "Release" ) @@ -83,6 +86,8 @@ if ( ${BLAS_NAME} STREQUAL "mkl" ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qmkl=parallel") elseif ( ${BLAS_NAME} STREQUAL "cblas" ) target_link_libraries( dgemm LINK_PUBLIC "openblas") +elseif ( ${BLAS_NAME} STREQUAL "blis" ) + target_link_libraries( dgemm LINK_PUBLIC "blis") # elseif ( ${BLAS_NAME} STREQUAL "libsci" ) # string( TOLOWER $ENV{PE_ENV} BLAS_COMPILER ) # set( BLAS_COMPILER $ENV{PE_ENV} ) @@ -93,5 +98,3 @@ elseif ( ${BLAS_NAME} MATCHES "cublas" ) elseif ( ${BLAS_NAME} STREQUAL "essl" ) target_link_libraries( dgemm LINK_PUBLIC "essl") endif() - - diff --git a/microbenchmarks/dgemm/src/mt-dgemm.c b/microbenchmarks/dgemm/src/mt-dgemm.c index fe1750d5..cef8e346 100644 --- a/microbenchmarks/dgemm/src/mt-dgemm.c +++ b/microbenchmarks/dgemm/src/mt-dgemm.c @@ -38,6 +38,11 @@ #define BLAS_LIB "cblas" #endif +#ifdef USE_BLIS +#include "blis.h" +#define BLAS_LIB "blis" +#endif + #ifdef USE_ESSL #include "essl.h" #define BLAS_LIB "essl" @@ -197,7 +202,7 @@ int main(int argc, char* argv[]) { // Repeat multiple times for(r = 0; r < repeats; r++) { -#if defined(USE_MKL) || defined(USE_CBLAS) || defined(USE_LIBSCI) +#if defined(USE_MKL) || defined(USE_CBLAS) || defined(USE_LIBSCI) || defined(USE_BLIS) cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, N, N, N, alpha, matrixA, N, matrixB, N, beta, matrixC, N); #elif defined(USE_CUBLAS)