mirror of
https://github.com/ggml-org/whisper.cpp.git
synced 2026-10-18 21:55:18 +02:00
opencl: fix l2_norm (llama/20480)
This commit is contained in:
@@ -63,7 +63,7 @@ kernel void kernel_l2_norm_f32(
|
|||||||
|
|
||||||
barrier(CLK_LOCAL_MEM_FENCE);
|
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)) {
|
for (int i00 = get_local_id(0); i00 < ne00; i00 += get_local_size(0)) {
|
||||||
y[i00] = x[i00] * scale;
|
y[i00] = x[i00] * scale;
|
||||||
|
|||||||
Reference in New Issue
Block a user