Felipe97/llama-cpp-compiled
01.1k
1BLIS Installation Manual2------------------------3 4BLIS is a portable software framework for high-performance BLAS-like dense linear algebra libraries. It has received awards and recognition, including the 2023 James H. Wilkinson Prize for Numerical Software and the 2020 SIAM Activity Group on Supercomputing Best Paper Prize. BLIS provides a new BLAS-like API and a compatibility layer for traditional BLAS routine calls. It offers features such as object-based API, typed API, BLAS and CBLAS compatibility layers.5 6Project URL: https://github.com/flame/blis7 8### Prepare:9 10Compile BLIS:11 12```bash13git clone https://github.com/flame/blis14cd blis15./configure --enable-cblas -t openmp,pthreads auto16# will install to /usr/local/ by default.17make -j18```19 20Install BLIS:21 22```bash23sudo make install24```25 26We recommend using openmp since it's easier to modify the cores being used.27 28### llama.cpp compilation29 30CMake:31 32```bash33mkdir build34cd build35cmake -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=FLAME ..36make -j37```38 39### llama.cpp execution40 41According to the BLIS documentation, we could set the following42environment variables to modify the behavior of openmp:43 44```bash45export GOMP_CPU_AFFINITY="0-19"46export BLIS_NUM_THREADS=1447```48 49And then run the binaries as normal.50 51 52### Intel specific issue53 54Some might get the error message saying that `libimf.so` cannot be found.55Please follow this [stackoverflow page](https://stackoverflow.com/questions/70687930/intel-oneapi-2022-libimf-so-no-such-file-or-directory-during-openmpi-compila).56 57### Reference:58 591. https://github.com/flame/blis#getting-started602. https://github.com/flame/blis/blob/master/docs/Multithreading.md61 