Skip to content

vulkan backend ops: implemented GATED_LINEAR_ATTN - #25601

Merged
ggerganov merged 6 commits into
ggml-org:masterfrom
PranavUttarkar:vulkan-gla
Aug 4, 2026
Merged

ggerganov merged 6 commits into
ggml-org:masterfrom
PranavUttarkar:vulkan-gla

Conversation

@PranavUttarkar

@PranavUttarkar PranavUttarkar commented Jul 12, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Added vulkan support for GGML_OP_GATED_LINEAR_ATTN

This backend op used to not be supported on vulkan and fell back to cpu. Now the kernel follows the existing wkv6.comp pattern w/ a GLA-specific update-before-read ordering and an output "scale" push constant.

supports_op is limited to F32 and head_size == 64 (shader hardcodes BLOCK_SIZE 64, same as WKV6).

Part of #14909

Additional information

Modeled on the vulkan WKV6 path. Checked against the CPU reference in ggml_compute_forward_gla_f32

Test results (AMD Radeon 780M, Windows)

test-backend-ops.exe test -b Vulkan0 -o GATED_LINEAR_ATTN 4/4 tests passed

adjacent recurrence ops after rebase:

  • RWKV_WKV6: 4/4
  • RWKV_WKV7: 4/4
  • GATED_DELTA_NET: 36/36
    Full Vulkan0 suite: 14400/14443. Remaining failures are preexisting DIV(type=f16, ...)`NMSE misses on this device/driver. reproduced on clean master with this change stashed and they remain.

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure:
    YES: AI was used in the beginning to understand the codebase and for easier search and navigation to different similar points. Code was all handwritten and then AI was used to review correctness and any gaps/oversights.

@PranavUttarkar
PranavUttarkar requested a review from a team as a code owner July 12, 2026 22:29
@github-actions github-actions Bot added documentation Improvements or additions to documentation Vulkan Issues specific to the Vulkan backend ggml changes relating to the ggml tensor library for machine learning labels Jul 12, 2026
@ggml-gh-bot

ggml-gh-bot Bot commented Jul 12, 2026

Copy link
Copy Markdown

Hi @PranavUttarkar, thanks for your contribution!

Per our contribution guidelines, the automated PR checker found the following issue(s) that need your attention:

  • PR Template not respected: Please respect the template when creating a new pull request. Make sure to fill out all required sections.

  • Large PR: Large changes require prior discussion (e.g. an issue or RFC) and maintainers may not be able to review this PR as-is. Consider splitting it into smaller, focused PRs.


Please note that maintainers reserve the right to make final decisions on PRs. If you believe there is a mistake, please comment below.

@PranavUttarkar

PranavUttarkar commented Jul 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi @PranavUttarkar, thanks for your contribution!

Per our contribution guidelines, the automated PR checker found the following issue(s) that need your attention:

  • PR Template not respected: Please respect the template when creating a new pull request. Make sure to fill out all required sections.
  • Large PR: Large changes require prior discussion (e.g. an issue or RFC) and maintainers may not be able to review this PR as-is. Consider splitting it into smaller, focused PRs.

Please note that maintainers reserve the right to make final decisions on PRs. If you believe there is a mistake, please comment below.

Not a Large PR. maybe the bot thinks so due to the vulkan.csv file updated with this:
test-backend-ops support --output csv -b Vulkan0 > docs/ops/Vulkan.csv

PR follows the template

@0cc4m 0cc4m left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good otherwise

Comment thread ggml/src/ggml-vulkan/ggml-vulkan.cpp Resolved
@0cc4m 0cc4m added the merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. label Jul 31, 2026

@CISC CISC left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update docs.

Regenerate docs/ops/Vulkan.csv and docs/ops.md so ops docs match current backend CSVs.

Assisted-by: Cursor Grok
@PranavUttarkar

Copy link
Copy Markdown
Contributor Author

@CISC Hey I just updated the PR

@ggerganov
ggerganov merged commit f26efa0 into ggml-org:master Aug 4, 2026
25 of 29 checks passed
satindergrewal pushed a commit to satindergrewal/llama.cpp that referenced this pull request Aug 12, 2026
* vulkan : add GATED_LINEAR_ATTN op

* docs : update Vulkan ops

* vulkan : remove unused GLA spec constant

* Updated ops.md

* ops.md update
brittlewis12 pushed a commit to brittlewis12/llama.cpp that referenced this pull request Aug 17, 2026
* vulkan : add GATED_LINEAR_ATTN op

* docs : update Vulkan ops

* vulkan : remove unused GLA spec constant

* Updated ops.md

* ops.md update
thecodacus pushed a commit to thecodacus/llama.cpp that referenced this pull request Sep 7, 2026
* vulkan : add GATED_LINEAR_ATTN op

* docs : update Vulkan ops

* vulkan : remove unused GLA spec constant

* Updated ops.md

* ops.md update
zbrad pushed a commit to zbrad/llama.cpp that referenced this pull request Sep 10, 2026
* vulkan : add GATED_LINEAR_ATTN op

* docs : update Vulkan ops

* vulkan : remove unused GLA spec constant

* Updated ops.md

* ops.md update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation ggml changes relating to the ggml tensor library for machine learning merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. Vulkan Issues specific to the Vulkan backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants