Skip to content

Commit a7d7781

Browse files
AlcpzNeo Zhang
authored andcommitted
sycl : fix powf call in device code (ggml-org#8368)
1 parent 86d41e6 commit a7d7781

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ggml/src/ggml-sycl/rope.cpp

Lines changed: 2 additions & 2 deletions
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)