Skip to content

Commit 9abe9ee

Browse files
authored
vulkan: predicate max operation in soft_max shaders/soft_max (ggml-org#10437)
Fixes ggml-org#10434
1 parent f95caa7 commit 9abe9ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ggml/src/ggml-vulkan/vulkan-shaders/soft_max.comp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ void soft_max(uint num_iters) {
7373

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

76-
max_val = max(max_val, v);
76+
if (col < p.KX) {
77+
max_val = max(max_val, v);
78+
}
7779

7880
if (idx < DATA_CACHE_SIZE) {
7981
data_cache[idx] = v;

0 commit comments

Comments
 (0)