]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
sycl : fix powf call in device code (llama/8368)
authorAlberto Cabrera Pérez <redacted>
Mon, 8 Jul 2024 13:22:41 +0000 (14:22 +0100)
committerGeorgi Gerganov <redacted>
Sat, 27 Jul 2024 15:26:12 +0000 (18:26 +0300)
src/ggml-sycl/rope.cpp

index eabf1693e2d2f4de4a58892a0feb071a4e947dd1..6f507941a022aeb1770e3b61b4f7b90e4b84bc22 100644 (file)
@@ -55,7 +55,7 @@ static void rope_norm(
     const int i = row*ne0 + i0;
     const int i2 = row/p_delta_rows;
 
-    const float theta_base = pos[i2]*powf(theta_scale, i0/2.0f);
+    const float theta_base = pos[i2] * sycl::pow(theta_scale, i0 / 2.0f);
 
     const float freq_factor = has_ff ? freq_factors[i0/2] : 1.0f;
 
@@ -98,7 +98,7 @@ static void rope_neox(
     const int i  = row*ne0 + i0/2;
     const int i2 = row/p_delta_rows;
 
-    const float theta_base = pos[i2]*powf(theta_scale, i0/2.0f);
+    const float theta_base = pos[i2] * sycl::pow(theta_scale, i0 / 2.0f);
 
     const float freq_factor = has_ff ? freq_factors[i0/2] : 1.0f;