mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-26 11:24:35 +00:00
f3f65429c4
* scripts : update sync [no ci] * files : relocate [no ci] * ci : disable kompute build [no ci] * cmake : fixes [no ci] * server : fix mingw build ggml-ci * cmake : minor [no ci] * cmake : link math library [no ci] * cmake : build normal ggml library (not object library) [no ci] * cmake : fix kompute build ggml-ci * make,cmake : fix LLAMA_CUDA + replace GGML_CDEF_PRIVATE ggml-ci * move public backend headers to the public include directory (#8122) * move public backend headers to the public include directory * nix test * spm : fix metal header --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com> * scripts : fix sync paths [no ci] * scripts : sync ggml-blas.h [no ci] --------- Co-authored-by: slaren <slarengh@gmail.com>
68 lines
1.7 KiB
Markdown
68 lines
1.7 KiB
Markdown
BLIS Installation Manual
|
|
------------------------
|
|
|
|
BLIS 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.
|
|
|
|
Project URL: https://github.com/flame/blis
|
|
|
|
### Prepare:
|
|
|
|
Compile BLIS:
|
|
|
|
```bash
|
|
git clone https://github.com/flame/blis
|
|
cd blis
|
|
./configure --enable-cblas -t openmp,pthreads auto
|
|
# will install to /usr/local/ by default.
|
|
make -j
|
|
```
|
|
|
|
Install BLIS:
|
|
|
|
```bash
|
|
sudo make install
|
|
```
|
|
|
|
We recommend using openmp since it's easier to modify the cores being used.
|
|
|
|
### llama.cpp compilation
|
|
|
|
Makefile:
|
|
|
|
```bash
|
|
make GGML_BLIS=1 -j
|
|
# make GGML_BLIS=1 llama-benchmark-matmult
|
|
```
|
|
|
|
CMake:
|
|
|
|
```bash
|
|
mkdir build
|
|
cd build
|
|
cmake -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=FLAME ..
|
|
make -j
|
|
```
|
|
|
|
### llama.cpp execution
|
|
|
|
According to the BLIS documentation, we could set the following
|
|
environment variables to modify the behavior of openmp:
|
|
|
|
```bash
|
|
export GOMP_CPU_AFFINITY="0-19"
|
|
export BLIS_NUM_THREADS=14
|
|
```
|
|
|
|
And then run the binaries as normal.
|
|
|
|
|
|
### Intel specific issue
|
|
|
|
Some might get the error message saying that `libimf.so` cannot be found.
|
|
Please follow this [stackoverflow page](https://stackoverflow.com/questions/70687930/intel-oneapi-2022-libimf-so-no-such-file-or-directory-during-openmpi-compila).
|
|
|
|
### Reference:
|
|
|
|
1. https://github.com/flame/blis#getting-started
|
|
2. https://github.com/flame/blis/blob/master/docs/Multithreading.md
|