Skip to content

Commit 19cf45e

Browse files
author
Huaishun Hu
committed
update musa build doc
1 parent f17d4d3 commit 19cf45e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/build.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,13 +205,21 @@ This provides GPU acceleration using the MUSA cores of your Moore Threads MTT GP
205205
cmake -B build -DGGML_MUSA=ON
206206
cmake --build build --config Release
207207
```
208+
- For static build:
209+
210+
```bash
211+
cmake -B build -DGGML_MUSA=ON \
212+
-DBUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON
213+
cmake --build build --config Release
214+
```
208215

209216
The environment variable [`MUSA_VISIBLE_DEVICES`](https://docs.mthreads.com/musa-sdk/musa-sdk-doc-online/programming_guide/Z%E9%99%84%E5%BD%95/) can be used to specify which GPU(s) will be used.
210217

211218
The environment variable `GGML_CUDA_ENABLE_UNIFIED_MEMORY=1` can be used to enable unified memory in Linux. This allows swapping to system RAM instead of crashing when the GPU VRAM is exhausted.
212219

213220
Most of the compilation options available for CUDA should also be available for MUSA, though they haven't been thoroughly tested yet.
214221

222+
215223
## HIP
216224

217225
This provides GPU acceleration on HIP-supported AMD GPUs.

0 commit comments

Comments
 (0)