mirror of
https://github.com/amd/blis.git
synced 2026-05-11 09:39:59 +00:00
- GoogleTest headers removed. GoogleTest gets fetched at configuration time. - BLIS headers removed. A BLIS installation path is required at configuration time. - Windows has been temporarily disabled. AMD-Internal: [CPUPL-2732] Change-Id: I9e55c8e43b2733f96cd8b6e5449d79623decad5c
Dependencies
- GoogleTest is used as the tool for testing. The library is fetched and build at configuration time. No installation necessary.
- An installation location for BLIS needs to be passed in as an argument during cmake invocation.
Build Tests
$ mkdir build
$ cd build
$ cmake .. -DBLIS_PATH = /home/username/blis_installation
$ make -j
This will build all executables into an executable named gtest_libblis.
Run Tests
./gtest_libblis
Configuration Options
There are multiple configuration options to chose from when invoking CMake.
Compiler Options
-DCMAKE_CXX_COMPILER=path_to_preferred_compilercan be used to specify the compiler.- For example, to compile with Clang, use
-DCMAKE_CXX_COMPILER=clang++.
Threading Options (Linux Only)
- For single threaded BLIS, use
-DENABLE_THREADING=no. - For multithreaded BLIS that uses pthreads, use
-DENABLE_THREADING=pthreads. - For multithreaded BLIS that uses OpenMP, use
-DENABLE_THREADING=openmp. [Default] * In addition, to use Intel OpenMP runtime, use-DOpenMP_LIBRARY=Intel. * For GNU OpenMP runtime, use-DOpenMP_LIBRARY=GNU. [Default]
BLIS Linking Type (Linux Only)
- To link static BLIS, use
-DBLIS_LINKING_TYPE=static. [Default] - To link shared BLIS, use
-DBLIS_LINKING_TYPE=shared. [Disabled]
Valgrind
- To build for a valgrind test, configure using
-DENABLE_VALGRIND=ON. [OFF by default] - Run the executable using $ OMP_NUM_THREADS=1 valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all --track-origins=yes -s ./gtest_libblis
Address Sanitizer
- To build using address sanitizer, configure using
-DENABLE_ASAN=ON. [OFF by default] - An installation to BLIS which was build with ASAN flags needs to be provided.
Currently tested only with clang compiler.