From 4714ec3fa8144c3d2e7c5f77a2983c5b95b9b193 Mon Sep 17 00:00:00 2001 From: FirstTimeEZ <179362031+FirstTimeEZ@users.noreply.github.com> Date: Fri, 15 Nov 2024 19:47:58 +1300 Subject: [PATCH 1/4] vulkan install instructions git bash mingw64 --- docs/build.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/docs/build.md b/docs/build.md index 95512415ab0b9..f93b60f0f7c80 100644 --- a/docs/build.md +++ b/docs/build.md @@ -280,6 +280,46 @@ The following compilation options are also available to tweak performance (yes, **Windows** +#### Git Bash MINGW64 + +[![](https://i.imgur.com/M8dnyk5.png)](https://git-scm.com/downloads/win). + +Download and install [`Git-SCM`](https://git-scm.com/downloads/win) with the default settings + +[![](https://i.imgur.com/hiAMq2S.png)](https://visualstudio.microsoft.com/) + +Download and install [`Visual Studio Community Edition`](https://visualstudio.microsoft.com/) and make sure you select `C++` + +[![](https://i.imgur.com/piiceV6.png)](https://cmake.org/download/) + +Download and install [`CMake`](https://cmake.org/download/) with the default settings + +[![](https://i.imgur.com/cN0LDwJ.png)](https://vulkan.lunarg.com/sdk/home#windows) + +Download and install the [`Vulkan SDK`](https://vulkan.lunarg.com/sdk/home#windows) with the default settings. + +![](https://i.imgur.com/qTl7jbF.png) + +Go into your `llama.cpp` directory and right click, select `Open Git Bash Here` and then run the following commands + +![](https://i.imgur.com/7UQ7Rf1.png) + +``` +cmake -B build -DGGML_VULKAN=ON +``` + +![](https://i.imgur.com/GlJnitl.png) + +``` +cmake --build build --config Release +``` + +Now you can load the model in conversation mode using `Vulkan` + +``` +build/bin/release/llama-cli -m "[PATH TO MODEL]" -ngl 100 -c 16384 -t 10 -n -2 -cnv +``` + #### w64devkit Download and extract [w64devkit](https://github.com/skeeto/w64devkit/releases). From 7ab4f0866935884aa3717f8a1c0e83b6a0cef19a Mon Sep 17 00:00:00 2001 From: FirstTimeEZ <179362031+FirstTimeEZ@users.noreply.github.com> Date: Sat, 16 Nov 2024 04:00:26 +1300 Subject: [PATCH 2/4] vulkan: build instructions to use git bash mingw64 --- docs/build.md | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/docs/build.md b/docs/build.md index d835d61d4d85c..18ca44ab48430 100644 --- a/docs/build.md +++ b/docs/build.md @@ -280,6 +280,28 @@ The following compilation options are also available to tweak performance (yes, **Windows** +#### w64devkit + +Download and extract [w64devkit](https://github.com/skeeto/w64devkit/releases). + +Download and install the [Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows). When selecting components, only the Vulkan SDK Core is required. + +Launch `w64devkit.exe` and run the following commands to copy Vulkan dependencies: +```sh +SDK_VERSION=1.3.283.0 +cp /VulkanSDK/$SDK_VERSION/Bin/glslc.exe $W64DEVKIT_HOME/bin/ +cp /VulkanSDK/$SDK_VERSION/Lib/vulkan-1.lib $W64DEVKIT_HOME/x86_64-w64-mingw32/lib/ +cp -r /VulkanSDK/$SDK_VERSION/Include/* $W64DEVKIT_HOME/x86_64-w64-mingw32/include/ +cat > $W64DEVKIT_HOME/x86_64-w64-mingw32/lib/pkgconfig/vulkan.pc < $W64DEVKIT_HOME/x86_64-w64-mingw32/lib/pkgconfig/vulkan.pc < Date: Sat, 16 Nov 2024 04:10:08 +1300 Subject: [PATCH 3/4] vulkan: build instructions to use git bash mingw64 consistency --- docs/build.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/build.md b/docs/build.md index 18ca44ab48430..3226fb34369f1 100644 --- a/docs/build.md +++ b/docs/build.md @@ -282,9 +282,13 @@ The following compilation options are also available to tweak performance (yes, #### w64devkit -Download and extract [w64devkit](https://github.com/skeeto/w64devkit/releases). +[![](https://github.com/user-attachments/assets/dee8d303-d40c-446d-85fc-60726d384d71)](https://github.com/skeeto/w64devkit/releases) -Download and install the [Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows). When selecting components, only the Vulkan SDK Core is required. +Download and extract [`w64devkit`](https://github.com/skeeto/w64devkit/releases). + +[![](https://i.imgur.com/cN0LDwJ.png)](https://vulkan.lunarg.com/sdk/home#windows) + +Download and install the [`Vulkan SDK`](https://vulkan.lunarg.com/sdk/home#windows) with the default settings. Launch `w64devkit.exe` and run the following commands to copy Vulkan dependencies: ```sh From a79d81daa72eb280cab826c6f4d6aad6a172f7ee Mon Sep 17 00:00:00 2001 From: FirstTimeEZ <179362031+FirstTimeEZ@users.noreply.github.com> Date: Sat, 16 Nov 2024 13:39:12 +1300 Subject: [PATCH 4/4] docs: vulkan build instructions to use git bash mingw64 --- docs/build.md | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/docs/build.md b/docs/build.md index 3226fb34369f1..811bbb409c250 100644 --- a/docs/build.md +++ b/docs/build.md @@ -282,12 +282,8 @@ The following compilation options are also available to tweak performance (yes, #### w64devkit -[![](https://github.com/user-attachments/assets/dee8d303-d40c-446d-85fc-60726d384d71)](https://github.com/skeeto/w64devkit/releases) - Download and extract [`w64devkit`](https://github.com/skeeto/w64devkit/releases). -[![](https://i.imgur.com/cN0LDwJ.png)](https://vulkan.lunarg.com/sdk/home#windows) - Download and install the [`Vulkan SDK`](https://vulkan.lunarg.com/sdk/home#windows) with the default settings. Launch `w64devkit.exe` and run the following commands to copy Vulkan dependencies: @@ -308,35 +304,18 @@ Switch into the `llama.cpp` directory and run `make GGML_VULKAN=1`. #### Git Bash MINGW64 -[![](https://i.imgur.com/M8dnyk5.png)](https://git-scm.com/downloads/win). - Download and install [`Git-SCM`](https://git-scm.com/downloads/win) with the default settings -[![](https://i.imgur.com/hiAMq2S.png)](https://visualstudio.microsoft.com/) - Download and install [`Visual Studio Community Edition`](https://visualstudio.microsoft.com/) and make sure you select `C++` -[![](https://i.imgur.com/piiceV6.png)](https://cmake.org/download/) - Download and install [`CMake`](https://cmake.org/download/) with the default settings -[![](https://i.imgur.com/cN0LDwJ.png)](https://vulkan.lunarg.com/sdk/home#windows) - Download and install the [`Vulkan SDK`](https://vulkan.lunarg.com/sdk/home#windows) with the default settings. -![](https://i.imgur.com/qTl7jbF.png) - Go into your `llama.cpp` directory and right click, select `Open Git Bash Here` and then run the following commands -![](https://i.imgur.com/7UQ7Rf1.png) - ``` cmake -B build -DGGML_VULKAN=ON -``` - -![](https://i.imgur.com/GlJnitl.png) - -``` cmake --build build --config Release ```