|
|
@@ -385,16 +385,30 @@ Building the program with BLAS support may lead to some performance improvements
|
|
|
|
|
|
Check [BLIS.md](docs/BLIS.md) for more information.
|
|
|
|
|
|
-- #### Intel MKL
|
|
|
+- #### Intel oneMKL
|
|
|
+ - Using manual oneAPI installation:
|
|
|
+ By default, `LLAMA_BLAS_VENDOR` is set to `Generic`, so if you already sourced intel environment script and assign `-DLLAMA_BLAS=ON` in cmake, the mkl version of Blas will automatically been selected. Otherwise please install oneAPI and follow the below steps:
|
|
|
+ ```bash
|
|
|
+ mkdir build
|
|
|
+ cd build
|
|
|
+ source /opt/intel/oneapi/setvars.sh # You can skip this step if in oneapi-runtime docker image, only required for manual installation
|
|
|
+ cmake .. -DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=Intel10_64lp -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DLLAMA_NATIVE=ON
|
|
|
+ cmake --build . --config Release
|
|
|
+ ```
|
|
|
|
|
|
- By default, `LLAMA_BLAS_VENDOR` is set to `Generic`, so if you already sourced intel environment script and assign `-DLLAMA_BLAS=ON` in cmake, the mkl version of Blas will automatically been selected. You may also specify it by:
|
|
|
+ - Using oneAPI docker image:
|
|
|
+ If you do not want to source the environment vars and install oneAPI manually, you can also build the code using intel docker container: [oneAPI-runtime](https://hub.docker.com/r/intel/oneapi-runtime)
|
|
|
|
|
|
- ```bash
|
|
|
- mkdir build
|
|
|
- cd build
|
|
|
- cmake .. -DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=Intel10_64lp -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx
|
|
|
- cmake --build . --config Release
|
|
|
- ```
|
|
|
+ ```bash
|
|
|
+ mkdir build
|
|
|
+ cd build
|
|
|
+ cmake .. -DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=Intel10_64lp -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DLLAMA_NATIVE=ON
|
|
|
+ cmake --build . --config Release
|
|
|
+ ```
|
|
|
+
|
|
|
+ Building through oneAPI compilers will make avx_vnni instruction set available for intel processors that do not support avx512 and avx512_vnni.
|
|
|
+
|
|
|
+ Check [Optimizing and Running LLaMA2 on Intel® CPU](https://www.intel.com/content/www/us/en/content-details/791610/optimizing-and-running-llama2-on-intel-cpu.html) for more information.
|
|
|
|
|
|
- #### cuBLAS
|
|
|
|