Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devops/vulkan.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN apt update && apt install -y git build-essential cmake wget xz-utils

# Install SSL and Vulkan SDK dependencies
RUN apt install -y libssl-dev curl \
libxcb-xinput0 libxcb-xinerama0 libxcb-cursor-dev libvulkan-dev glslc
libxcb-xinput0 libxcb-xinerama0 libxcb-cursor-dev libvulkan-dev glslc spirv-headers

# Build it
WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ jobs:
id: depends
run: |
sudo apt-get update
sudo apt-get install -y gcc-14 g++-14 build-essential glslc libvulkan-dev libssl-dev ninja-build
sudo apt-get install -y gcc-14 g++-14 build-essential glslc libvulkan-dev spirv-headers libssl-dev ninja-build
echo "CC=gcc-14" >> "$GITHUB_ENV"
echo "CXX=g++-14" >> "$GITHUB_ENV"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ jobs:
sudo apt-get install -y build-essential mesa-vulkan-drivers vulkan-sdk libssl-dev
else
sudo apt-get update -y
sudo apt-get install -y gcc-14 g++-14 build-essential glslc libvulkan-dev libssl-dev ninja-build
sudo apt-get install -y gcc-14 g++-14 build-essential glslc libvulkan-dev spirv-headers libssl-dev ninja-build
echo "CC=gcc-14" >> "$GITHUB_ENV"
echo "CXX=g++-14" >> "$GITHUB_ENV"
fi
Expand Down
7 changes: 5 additions & 2 deletions docs/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,8 @@ pacman -S git \
mingw-w64-ucrt-x86_64-gcc \
mingw-w64-ucrt-x86_64-cmake \
mingw-w64-ucrt-x86_64-vulkan-devel \
mingw-w64-ucrt-x86_64-shaderc
mingw-w64-ucrt-x86_64-shaderc \
mingw-w64-ucrt-x86_64-spirv-headers
```

Switch into the `llama.cpp` directory and build using CMake.
Expand Down Expand Up @@ -490,9 +491,11 @@ First, follow the official LunarG instructions for the installation and setup of

On Debian / Ubuntu, you can install the required dependencies using:
```sh
sudo apt-get install libvulkan-dev glslc
sudo apt-get install libvulkan-dev glslc spirv-headers
```

SPIRV-Headers (`spirv/unified1/spirv.hpp`) are required for the Vulkan backend and are **not** always pulled in by the Vulkan loader dev package alone. Other distros use names such as `spirv-headers` (Ubuntu / Debian / Arch), or `spirv-headers-devel` (Fedora / openSUSE). On Windows, the LunarG Vulkan SDK’s `Include` directory already contains these headers.

#### Common steps

Second, after verifying that you have followed all of the SDK installation/setup steps, use this command to make sure before proceeding:
Expand Down
201 changes: 107 additions & 94 deletions ggml/src/ggml-vulkan/ggml-vulkan.cpp

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion ggml/src/ggml-vulkan/vulkan-shaders/copy_to_quant.comp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#version 450

#include "rte.glsl"
#include "types.glsl"

#if defined(SET_ROWS) && QUANT_K == 1
Expand Down
1 change: 0 additions & 1 deletion ggml/src/ggml-vulkan/vulkan-shaders/diag.comp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#version 450

#include "rte.glsl"
#include "types.glsl"
#include "generic_unary_head.glsl"

Expand Down
1 change: 0 additions & 1 deletion ggml/src/ggml-vulkan/vulkan-shaders/exp.comp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#version 450

#include "rte.glsl"
#include "generic_head.glsl"
#include "types.glsl"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#extension GL_EXT_shader_16bit_storage : require
#extension GL_EXT_control_flow_attributes : require

#include "rte.glsl"
#include "utils.glsl"
#if RMS_NORM_ROPE_FUSION
#include "rope_params.glsl"
Expand Down
1 change: 0 additions & 1 deletion ggml/src/ggml-vulkan/vulkan-shaders/glu_head.glsl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#extension GL_EXT_shader_16bit_storage : require

#include "rte.glsl"

layout(local_size_x = 512, local_size_y = 1, local_size_z = 1) in;

Expand Down
1 change: 0 additions & 1 deletion ggml/src/ggml-vulkan/vulkan-shaders/im2col.comp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#extension GL_EXT_shader_16bit_storage : require
#extension GL_EXT_control_flow_attributes : require

#include "rte.glsl"
#include "types.glsl"

layout (push_constant) uniform parameter
Expand Down
1 change: 0 additions & 1 deletion ggml/src/ggml-vulkan/vulkan-shaders/im2col_3d.comp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#extension GL_EXT_control_flow_attributes : require
#extension GL_EXT_shader_explicit_arithmetic_types_int32 : require

#include "rte.glsl"
#include "types.glsl"

layout (push_constant) uniform parameter
Expand Down
1 change: 0 additions & 1 deletion ggml/src/ggml-vulkan/vulkan-shaders/log.comp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#version 450

#include "rte.glsl"
#include "types.glsl"
#include "generic_unary_head.glsl"

Expand Down
1 change: 0 additions & 1 deletion ggml/src/ggml-vulkan/vulkan-shaders/multi_add.comp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#extension GL_KHR_shader_subgroup_basic : enable
#endif

#include "rte.glsl"
#include "types.glsl"
#include "utils.glsl"

Expand Down
1 change: 0 additions & 1 deletion ggml/src/ggml-vulkan/vulkan-shaders/rope_head.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#extension GL_EXT_shader_16bit_storage : require

#include "rte.glsl"
#include "rope_params.glsl"

layout(local_size_x = 1, local_size_y = 256, local_size_z = 1) in;
Expand Down
2 changes: 0 additions & 2 deletions ggml/src/ggml-vulkan/vulkan-shaders/rope_params.glsl
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#if !defined(GGML_ROPE_PARAMS)
#define GGML_ROPE_PARAMS

#include "rte.glsl"

struct rope_params {
uint rope_mode;
uint nrows;
Expand Down
5 changes: 0 additions & 5 deletions ggml/src/ggml-vulkan/vulkan-shaders/rte.glsl

This file was deleted.

1 change: 0 additions & 1 deletion ggml/src/ggml-vulkan/vulkan-shaders/tri.comp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#version 450

#include "rte.glsl"
#include "types.glsl"
#include "generic_unary_head.glsl"

Expand Down
91 changes: 31 additions & 60 deletions ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp

Large diffs are not rendered by default.

Loading