Skip to content

Commit 69b7402

Browse files
committed
ggml : avoid using ggml_fp16_to_fp32() and ggml_fp32_to_fp16() in ggml.c
1 parent f266259 commit 69b7402

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ggml.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8057,11 +8057,11 @@ static void ggml_compute_forward_rope_f16(
80578057
const ggml_fp16_t * const src = (ggml_fp16_t *)((char *) src0->data + i3*nb3 + i2*nb2 + i1*nb1 + i0*nb0);
80588058
ggml_fp16_t * dst_data = (ggml_fp16_t *)((char *) dst->data + i3*nb3 + i2*nb2 + i1*nb1 + i0*nb0);
80598059

8060-
const float x0 = ggml_fp16_to_fp32(src[0]);
8061-
const float x1 = ggml_fp16_to_fp32(src[1]);
8060+
const float x0 = GGML_FP16_TO_FP32(src[0]);
8061+
const float x1 = GGML_FP16_TO_FP32(src[1]);
80628062

8063-
dst_data[0] = ggml_fp32_to_fp16(x0*cos_theta - x1*sin_theta);
8064-
dst_data[1] = ggml_fp32_to_fp16(x0*sin_theta + x1*cos_theta);
8063+
dst_data[0] = GGML_FP32_TO_FP16(x0*cos_theta - x1*sin_theta);
8064+
dst_data[1] = GGML_FP32_TO_FP16(x0*sin_theta + x1*cos_theta);
80658065
}
80668066
}
80678067
}

0 commit comments

Comments
 (0)