From: Alberto Cabrera Pérez Date: Mon, 8 Jul 2024 13:22:41 +0000 (+0100) Subject: sycl : fix powf call in device code (llama/8368) X-Git-Tag: upstream/0.0.1642~528 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=0870827013fcacc27a38f78cbbfacff3741a3500;p=pkg%2Fggml%2Fsources%2Fggml sycl : fix powf call in device code (llama/8368) --- diff --git a/src/ggml-sycl/rope.cpp b/src/ggml-sycl/rope.cpp index eabf1693..6f507941 100644 --- a/src/ggml-sycl/rope.cpp +++ b/src/ggml-sycl/rope.cpp @@ -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;