Skip to content
AI NEWS JOURNAL
llama.cpp releasesAI NEWS / JOURNAL

b12868

The update introduces several Vulkan optimizations for convolution operations, including a new 'halo' shader that reduces redundant memory accesses, split_k support for both 2D and 3D convolutions, improved tile selection, and better workgroup traversal. These changes enhance performance on RTX 5090, with up to 2.71x speedup in some cases, and improve efficiency by eliminating wasted accumulator space and optimizing memory layout.

<details open> vulkan: improve CONV_2D/3D performance (#32629) * tests: add conv2d/conv3d cases from diffusion models I asked Claude to add more representative perf tests, to optimize against Assisted-by: Claude Opus 5.5 * vulkan: Avoid private variables in coopmat2 callbacks There's a compiler bug where these can spill to local memory, making the coopmat2 shader slower than coopmat1. Assisted-by: Claude Opus 5.5 * vulkan: split_k for conv_2d #29929 added split_k for conv_3d, at the time I didn't see much benefit to doing the same for conv_2d, but with additional test cases this helps, and it also interacts well with the upcoming halo optimization Assisted-by: Claude Opus 5.5 * vulkan: Add conv_2d/3d "halo" shader This shader copies the input region corresponding to the output region (plus the "halo") once into shared memory, rather than for each filter tap. Assisted-by: Claude Opus 5.5 * vulkan: don't waste accumulator space on discarded halo elements All elements of the result accumulator now correspond to real work in the output tile, where in the previous commit the accumulator had "halo" elements that did wasted work and were discarded during store. Claude's description: Each accumulator fragment covers 16 (or 8) pixels of one tile row, and its B matrix is that box row shifted by the tap. Box rows no longer need padding and no multiplies are spent on the border columns. Tiles are 256 pixels where the output allows, otherwise the shape with the least padded area weighted by its cost per output. 8-pixel fragments use 16x8x16 cooperative matrices when the device has them. The header comment describes the new layout. RTX 5090: SD1.5 64x64 320->320 1.81x, 3D Wan 130x130x3 384 1.41x, 3D 106x154x6 96->96 1.34x; CONV_2D +6%, CONV_3D +11%. Assisted-by: Claude Opus 5.5 * vulkan: Enable split_k for the conv_halo shader The reduction logic is still shared with conv2d_mm and mul_mat (mul_mat_split_k_reduce). RTX 5090: SD1.5 8x8 1280->1280 2.71x, 16x16 1280->1280 1.63x, 32x32 640->640 1.61x, SDXL 32x32 2560->1280 1.61x; CONV_2D +13%, CONV_3D +3%. Assisted-by: Claude Opus 5.5 * vulkan: Tweak the conv shader selection heuristic to use halo more often Claude's summary: - Small 2D layers that read the filter in place, and have enough passes to split, use 32 output channels per workgroup before splitting the passes: twice the workgroups, without split-K's partial outputs and reduce. (With the filter copy, and for 1x1 filters, this was slower.) - 3D layers with fewer than 4K outputs use the halo shader instead of conv3d_mm, despite the filter copy. - Layers with 16 to 48 input channels use it instead of conv2d_mm; the limit of 64 predates split-K and the row-aligned tiles. RTX 5090: SD1.5 8x8 1280->1280 1.35x, VAE 128x128 16->512 1.47x, 1536x1536 32->64 1.28x, 3D 28x40x3 384->384 1.64x, 1024->1024 1.37x; CONV_2D +6%, CONV_3D +4%. Assisted-by: Claude Opus 5.5 * vulkan: Tweak tile selection and workgroup traversal order Claude's summary: - 56x4 tiles (8-pixel fragments) for outputs 49 to 56 wide, so 52-wide layers pad to 56 instead of 64; tiles of 192 pixels or more now cost the same as 256. Skipped on layers with too few workgroups to fill half the GPU. - All output channels in one workgroup when 64 < Cout <= 128 and Cout is not a multiple of 64 (96 no longer pads to 128), on tiles of up to 128 pixels. The tile choice now counts output channel padding. - 3D tiles numbered with the output depth slices fastest, so workgroups of neighboring output slices run together and share their input slices in L2. Adds CONV_2D/CONV_3D tests for 56x4 tiles and Cout 80, 96 and 112. RTX 5090: 3D Wan 480p 96->96 482x834x6 1.18x, 96->96 154x106x6 1.15x, 1280->1280 76x52x8 1.13x, 320->1280 76x52x8 1.12x, Wan 480p 192 242x418x6 1.05x; geomean +2% over all the CONV perf cases (RTX 4070 +3%). Assisted-by: Claude Opus 5.5 * trim comments </details> **Website:** - <https://llama.app> **Attestations:** - <https://github.com/ggml-org/llama.cpp/attestations/74253937> **macOS/iOS:** - [macOS Apple Silicon (arm64)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-macos-arm64.tar.gz) - macOS Apple Silicon (arm64, KleidiAI enabled) [DISABLED](https://github.com/ggml-org/llama.cpp/pull/23780) - [macOS Intel (x64)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-macos-x64.tar.gz) - [iOS XCFramework](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-xcframework.zip) **Linux:** - [Ubuntu x64 (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-ubuntu-x64.tar.gz) - [Ubuntu arm64 (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-ubuntu-arm64.tar.gz) - [Ubuntu 24.04 s390x (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-ubuntu-s390x.tar.gz) - [Ubuntu 26.04 s390x (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-ubuntu-26.04-s390x.tar.gz) - [Ubuntu 26.04 s390x (zDNN)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-ubuntu-zdnn-s390x.tar.gz) - [Ubuntu x64 (Vulkan)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-ubuntu-vulkan-x64.tar.gz) - [Ubuntu arm64 (Vulkan)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-ubuntu-vulkan-arm64.tar.gz) - [Ubuntu x64 (CUDA 12)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-ubuntu-cuda-12.8-x64.tar.gz) - [CUDA 12.8 libraries](https://github.com/ggml-org/llama.cpp/releases/download/b12868/cudart-llama-b12868-bin-ubuntu-cuda-12.8-x64.tar.gz) - [Ubuntu x64 (CUDA 13)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-ubuntu-cuda-13.5-x64.tar.gz) - [CUDA 13.5 libraries](https://github.com/ggml-org/llama.cpp/releases/download/b12868/cudart-llama-b12868-bin-ubuntu-cuda-13.5-x64.tar.gz) - [Ubuntu arm64 (CUDA 13)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-ubuntu-cuda-13.5-arm64.tar.gz) - [CUDA 13.5 libraries](https://github.com/ggml-org/llama.cpp/releases/download/b12868/cudart-llama-b12868-bin-ubuntu-cuda-13.5-arm64.tar.gz) - [Ubuntu x64 (ROCm 10.0)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-ubuntu-rocm-10.0-x64.tar.gz) - [Ubuntu x64 (OpenVINO)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-ubuntu-openvino-2026.4.1-x64.tar.gz) - [Ubuntu x64 (SYCL FP32)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-ubuntu-sycl-fp32-x64.tar.gz) - [Ubuntu x64 (SYCL FP16)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-ubuntu-sycl-fp16-x64.tar.gz) - [Linux arm64 (Snapdragon: CPU, Adreno GPU, Hexagon NPU)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-linux-arm64-snapdragon.tar.gz) - [setup guide](https://github.com/ggml-org/llama.cpp/blob/master/docs/backend/snapdragon/linux.md) **Android:** - [Android arm64 (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-android-arm64.tar.gz) - [Android arm64 (Snapdragon: CPU, Adreno GPU, Hexagon NPU)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-android-arm64-snapdragon.tar.gz) - [setup guide](https://github.com/ggml-org/llama.cpp/blob/master/docs/backend/snapdragon/README.md) **Windows:** - [Windows x64 (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-win-cpu-x64.zip) - [Windows arm64 (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-win-cpu-arm64.zip) - [Windows arm64 (OpenCL Adreno)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-win-opencl-adreno-arm64.zip) - [Windows x64 (CUDA 12)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-win-cuda-12.4-x64.zip) - [CUDA 12.4 DLLs](https://github.com/ggml-org/llama.cpp/releases/download/b12868/cudart-llama-bin-win-cuda-12.4-x64.zip) - [Windows x64 (CUDA 13)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-win-cuda-13.5-x64.zip) - [CUDA 13.5 DLLs](https://github.com/ggml-org/llama.cpp/releases/download/b12868/cudart-llama-bin-win-cuda-13.5-x64.zip) - [Windows arm64 (CUDA 13)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-win-cuda-13.5-arm64.zip) - [CUDA 13.5 DLLs](https://github.com/ggml-org/llama.cpp/releases/download/b12868/cudart-llama-bin-win-cuda-13.5-arm64.zip) - [Windows x64 (Vulkan)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-win-vulkan-x64.zip) - [Windows arm64 (Vulkan)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-win-vulkan-arm64.zip) - [Windows x64 (OpenVINO)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-win-openvino-2026.4.1-x64.zip) - [Windows x64 (SYCL)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-win-sycl-x64.zip) - [Windows x64 (ROCm 10.0)](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-bin-win-rocm-10.0-x64.zip) **openEuler:** - [DISABLED](https://github.com/ggml-org/llama.cpp/pull/23705) - openEuler x86 (310p) - openEuler x86 (910b, ACL Graph) - openEuler aarch64 (310p) - openEuler aarch64 (910b, ACL Graph) **UI:** - [UI](https://github.com/ggml-org/llama.cpp/releases/download/b12868/llama-b12868-ui.tar.gz)

Sources

Read original ↗

Related topics

← Continue to all updates