Skip to content

vulkan: Apply bias before softmax in FA, to avoid overflow#24909

Merged
jeffbolznv merged 1 commit into
ggml-org:masterfrom
jeffbolznv:FATTN_KQ_MAX_OFFSET
Jun 24, 2026
Merged

vulkan: Apply bias before softmax in FA, to avoid overflow#24909
jeffbolznv merged 1 commit into
ggml-org:masterfrom
jeffbolznv:FATTN_KQ_MAX_OFFSET

Conversation

@jeffbolznv

Copy link
Copy Markdown
Contributor

Overview

Apply a bias in the scalar/cm1 FA paths to avoid fp16 overflow. Should fix leejet/stable-diffusion.cpp#1678.

This bias was already in the cm2 path. cm2 is still generating a bad image, but it appears to be related to conv2d rather than FA (works if I disable coopmat2 for conv2d).

Requirements

@jeffbolznv jeffbolznv requested a review from a team as a code owner June 22, 2026 16:23
@github-actions github-actions Bot added Vulkan Issues specific to the Vulkan backend ggml changes relating to the ggml tensor library for machine learning labels Jun 22, 2026
@0cc4m

0cc4m commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

@ggml-org/maintainers Another approval needed.

@jeffbolznv jeffbolznv merged commit ac4105d into ggml-org:master Jun 24, 2026
17 of 18 checks passed
Geminihaha pushed a commit to Geminihaha/llama.cpp that referenced this pull request Jun 25, 2026
papamoose pushed a commit to papamoose/llama.cpp that referenced this pull request Jun 27, 2026
adrianhoehne pushed a commit to adrianhoehne/llama.cpp that referenced this pull request Jul 5, 2026
adromir pushed a commit to adromir/llama-cpp-turboquant that referenced this pull request Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning Vulkan Issues specific to the Vulkan backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants