mirror of
https://github.com/ggerganov/whisper.cpp
synced 2026-04-29 18:21:30 +02:00
opencl: fix l2_norm (llama/20480)
This commit is contained in:
parent
c7abcd577b
commit
a31600d8e3
@ -63,7 +63,7 @@ kernel void kernel_l2_norm_f32(
|
||||
|
||||
barrier(CLK_LOCAL_MEM_FENCE);
|
||||
|
||||
const float scale = 1.0f/sqrt(max(sum[0], eps));
|
||||
const float scale = 1.0f/max(sqrt(sum[0]), eps);
|
||||
|
||||
for (int i00 = get_local_id(0); i00 < ne00; i00 += get_local_size(0)) {
|
||||
y[i00] = x[i00] * scale;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user