Spaces:
Running
Running
Commit
·
0a14325
1
Parent(s):
c31abdb
vulkan: predicate max operation in soft_max shaders/soft_max (llama/10437)
Browse files
ggml/src/ggml-vulkan/vulkan-shaders/soft_max.comp
CHANGED
|
@@ -73,7 +73,9 @@ void soft_max(uint num_iters) {
|
|
| 73 |
|
| 74 |
FLOAT_TYPE v = a * p.scale + slope * b;
|
| 75 |
|
| 76 |
-
|
|
|
|
|
|
|
| 77 |
|
| 78 |
if (idx < DATA_CACHE_SIZE) {
|
| 79 |
data_cache[idx] = v;
|
|
|
|
| 73 |
|
| 74 |
FLOAT_TYPE v = a * p.scale + slope * b;
|
| 75 |
|
| 76 |
+
if (col < p.KX) {
|
| 77 |
+
max_val = max(max_val, v);
|
| 78 |
+
}
|
| 79 |
|
| 80 |
if (idx < DATA_CACHE_SIZE) {
|
| 81 |
data_cache[idx] = v;
|