Skip to content

Commit de1bb5a

Browse files
committed
Add build command for CUDA with path example
1 parent ce8784b commit de1bb5a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/build.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ This provides GPU acceleration using an NVIDIA GPU. Make sure to have the CUDA t
127127
cmake --build build --config Release
128128
```
129129

130+
- Using `CMake` with path :
131+
132+
```bash
133+
rm -rf build & /usr/local/bin/cmake -B build -DGGML_CUDA=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc
134+
/usr/local/bin/cmake --build build --config Release -j
135+
```
130136
The environment variable [`CUDA_VISIBLE_DEVICES`](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#env-vars) can be used to specify which GPU(s) will be used.
131137

132138
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. In Windows this setting is available in the NVIDIA control panel as `System Memory Fallback`.

0 commit comments

Comments
 (0)