Skip to content

Commit 2ec846d

Browse files
authored
sycl : fix powf call in device code (#8368)
1 parent 3f2d538 commit 2ec846d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ggml/src/ggml-sycl/rope.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static void rope_norm(
5555
const int i = row*ne0 + i0;
5656
const int i2 = row/p_delta_rows;
5757

58-
const float theta_base = pos[i2]*powf(theta_scale, i0/2.0f);
58+
const float theta_base = pos[i2] * sycl::pow(theta_scale, i0 / 2.0f);
5959

6060
const float freq_factor = has_ff ? freq_factors[i0/2] : 1.0f;
6161

@@ -98,7 +98,7 @@ static void rope_neox(
9898
const int i = row*ne0 + i0/2;
9999
const int i2 = row/p_delta_rows;
100100

101-
const float theta_base = pos[i2]*powf(theta_scale, i0/2.0f);
101+
const float theta_base = pos[i2] * sycl::pow(theta_scale, i0 / 2.0f);
102102

103103
const float freq_factor = has_ff ? freq_factors[i0/2] : 1.0f;
104104

0 commit comments

Comments
 (0)