Skip to content

Commit 7ab4f08

Browse files
authored
vulkan: build instructions to use git bash mingw64
1 parent 4e856e3 commit 7ab4f08

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

docs/build.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,28 @@ The following compilation options are also available to tweak performance (yes,
280280
281281
**Windows**
282282
283+
#### w64devkit
284+
285+
Download and extract [w64devkit](https://github.com/skeeto/w64devkit/releases).
286+
287+
Download and install the [Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows). When selecting components, only the Vulkan SDK Core is required.
288+
289+
Launch `w64devkit.exe` and run the following commands to copy Vulkan dependencies:
290+
```sh
291+
SDK_VERSION=1.3.283.0
292+
cp /VulkanSDK/$SDK_VERSION/Bin/glslc.exe $W64DEVKIT_HOME/bin/
293+
cp /VulkanSDK/$SDK_VERSION/Lib/vulkan-1.lib $W64DEVKIT_HOME/x86_64-w64-mingw32/lib/
294+
cp -r /VulkanSDK/$SDK_VERSION/Include/* $W64DEVKIT_HOME/x86_64-w64-mingw32/include/
295+
cat > $W64DEVKIT_HOME/x86_64-w64-mingw32/lib/pkgconfig/vulkan.pc <<EOF
296+
Name: Vulkan-Loader
297+
Description: Vulkan Loader
298+
Version: $SDK_VERSION
299+
Libs: -lvulkan-1
300+
EOF
301+
302+
```
303+
Switch into the `llama.cpp` directory and run `make GGML_VULKAN=1`.
304+
283305
#### Git Bash MINGW64
284306
285307
[![](https://i.imgur.com/M8dnyk5.png)](https://git-scm.com/downloads/win).
@@ -320,28 +342,6 @@ Now you can load the model in conversation mode using `Vulkan`
320342
build/bin/release/llama-cli -m "[PATH TO MODEL]" -ngl 100 -c 16384 -t 10 -n -2 -cnv
321343
```
322344
323-
#### w64devkit
324-
325-
Download and extract [w64devkit](https://github.com/skeeto/w64devkit/releases).
326-
327-
Download and install the [Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows). When selecting components, only the Vulkan SDK Core is required.
328-
329-
Launch `w64devkit.exe` and run the following commands to copy Vulkan dependencies:
330-
```sh
331-
SDK_VERSION=1.3.283.0
332-
cp /VulkanSDK/$SDK_VERSION/Bin/glslc.exe $W64DEVKIT_HOME/bin/
333-
cp /VulkanSDK/$SDK_VERSION/Lib/vulkan-1.lib $W64DEVKIT_HOME/x86_64-w64-mingw32/lib/
334-
cp -r /VulkanSDK/$SDK_VERSION/Include/* $W64DEVKIT_HOME/x86_64-w64-mingw32/include/
335-
cat > $W64DEVKIT_HOME/x86_64-w64-mingw32/lib/pkgconfig/vulkan.pc <<EOF
336-
Name: Vulkan-Loader
337-
Description: Vulkan Loader
338-
Version: $SDK_VERSION
339-
Libs: -lvulkan-1
340-
EOF
341-
342-
```
343-
Switch into the `llama.cpp` directory and run `make GGML_VULKAN=1`.
344-
345345
#### MSYS2
346346
Install [MSYS2](https://www.msys2.org/) and then run the following commands in a UCRT terminal to install dependencies.
347347
```sh

0 commit comments

Comments
 (0)