Feature Request: VULKAN CODE PATCH

オープン
#173 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
28/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
cpp, machine-learning
領域
performance

調査の方向性

The proposed change touches ggml/src/ggml-vulkan/ggml-vulkan.cpp, specifically the disable_host_visible_vidmem default for discrete AMD GPUs and the MUL_MAT_VEC workgroup tuning. Start by reproducing the slow decode on RDNA hardware with a Vulkan build and comparing against the attached patch. Done would mean a measured, verified speedup that does not regress other GPUs. The patch itself is unreviewed, so confirm the approach with maintainers before writing code.

索引モデルが issue の本文から書いたものです。

説明

enhancement
Prerequisites
  • I am running the latest code. Mention the version if possible as well.
  • I carefully followed the README.md.
  • I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
  • I reviewed the Discussions, and have a new and useful enhancement to share.
Feature Description

I was fiddling with the Vulkan issues on rx9070 xt and it was giving me 4 - 5 TG/s .

here is a patch i had for llama.cpp earlier.. i used it to adapt and fix the beellama.cpp.


Vulkan Performance Fix for AMD RDNA2/3/4 (RX 9070 XT and similar)
Issue: AMD RX 9070 XT (RDNA4/gfx1201) was getting only ~5 t/s decode speed on Qwen3-8B-Q4_K_M via Vulkan backend.
Root cause: AMD's proprietary Vulkan driver incorrectly reports host-visible device memory support on discrete GPUs. Without REBAR enabled, accessing host-visible VRAM from GPU is extremely slow, creating a severe bottleneck in MUL_MAT_VEC operations during decode (output projection layer).
Fix: Force device-local memory allocation by default for AMD RDNA2/RDNA3/RDNA4 discrete GPUs, bypassing the slow host-visible path.
Results: 5.4 t/s → 89-90 t/s decode (16.5x improvement), 355 t/s → 1617 t/s prompt processing (4.5x improvement).
Changes in ggml/src/ggml-vulkan/ggml-vulkan.cpp:

  1. Added AMD_RDNA4 architecture detection (API version 1.4, device ID 0x7550)
  2. Disabled KHR_coopmat for RDNA4 (has WMMA, not cooperative matrices)
  3. Added RDNA4 to pipeline configs and row management optimizations
  4. Added AMD-specific MUL_MAT_VEC workgroup size tuning
  5. Set disable_host_visible_vidmem = true by default for discrete AMD RDNA GPUs

vulkan-amd-rdna4-perf-fix.patch

Motivation

Vulkan was performing really bad. I am working on fixing the PP and TG more

Possible Implementation

No response

主要言語
C++
スター
1.2k
フォーク
80
平均マージ
4日 20時間
マージ済み PR(30日)
2

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Anbeeld/beellama.cpp のほかの issue

Anbeeld/beellama.cpp の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。