Skip to content

Commit

Permalink
vulkan: predicate max operation in soft_max shaders/soft_max (#10437)
Browse files Browse the repository at this point in the history
Fixes #10434
  • Loading branch information
jeffbolznv authored Nov 20, 2024
1 parent f95caa7 commit 9abe9ee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ggml/src/ggml-vulkan/vulkan-shaders/soft_max.comp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ void soft_max(uint num_iters) {

FLOAT_TYPE v = a * p.scale + slope * b;

max_val = max(max_val, v);
if (col < p.KX) {
max_val = max(max_val, v);
}

if (idx < DATA_CACHE_SIZE) {
data_cache[idx] = v;
Expand Down

0 comments on commit 9abe9ee

Please sign in to comment.