vulkan: predicate max operation in soft_max shaders/soft_max (#10437)

Fixes #10434
This commit is contained in:
Jeff Bolz 2024-11-20 13:47:36 -06:00 committed by GitHub
parent f95caa7954
commit 9abe9eeae9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;