Skip to content

Commit 372f662

Browse files
committed
docs: add s390x-specific build docs
Signed-off-by: Aaron Teo <[email protected]>
1 parent ef03580 commit 372f662

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

docs/build-s390x.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Build llama.cpp locally (for s390x)
2+
3+
The main product of this project is the `llama` library. Its C-style interface can be found in [include/llama.h](include/llama.h).
4+
5+
The project also includes many example programs and tools using the `llama` library. The examples range from simple, minimal code snippets to sophisticated sub-projects such as an OpenAI-compatible HTTP server.
6+
7+
**To get the code:**
8+
9+
```bash
10+
git clone https://github.com/ggml-org/llama.cpp
11+
cd llama.cpp
12+
```
13+
14+
## CPU Build with BLAS
15+
16+
Building llama.cpp with BLAS support is highly recommended as it has shown to provide performance improvements.
17+
18+
```bash
19+
cmake -S . -B build \
20+
-DCMAKE_BUILD_TYPE=Release \
21+
-DGGML_BLAS=ON \
22+
-DGGML_BLAS_VENDOR=OpenBLAS
23+
24+
cmake --build build --config Release -j $(nproc)
25+
```
26+
27+
**Notes**:
28+
- For faster repeated compilation, install [ccache](https://ccache.dev/)
29+
- For debug builds:
30+
31+
```bash
32+
cmake -S . -B build \
33+
-DCMAKE_BUILD_TYPE=Debug \
34+
-DGGML_BLAS=ON \
35+
-DGGML_BLAS_VENDOR=OpenBLAS
36+
37+
cmake --build build --config Debug -j $(nproc)
38+
```
39+
40+
- For static builds, add `-DBUILD_SHARED_LIBS=OFF`:
41+
42+
```bash
43+
cmake -S . -B build \
44+
-DCMAKE_BUILD_TYPE=Release \
45+
-DGGML_BLAS=ON \
46+
-DGGML_BLAS_VENDOR=OpenBLAS \
47+
-DBUILD_SHARED_LIBS=OFF
48+
49+
cmake --build build --config Release -j $(nproc)
50+
```
51+
52+

0 commit comments

Comments
 (0)