From f9d2b252617a140ee99c0609667b38134fd0ad32 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Wed, 22 May 2024 10:00:29 +0300 Subject: [PATCH] cuda : fix rope pos data ggml-ci --- ggml-cuda/rope.cu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ggml-cuda/rope.cu b/ggml-cuda/rope.cu index 4a558f4b3..50f2cf415 100644 --- a/ggml-cuda/rope.cu +++ b/ggml-cuda/rope.cu @@ -283,9 +283,9 @@ void ggml_cuda_op_rope(ggml_backend_cuda_context & ctx, ggml_tensor * dst) { const bool is_neox = mode & 2; const bool is_glm = mode & 4; - if (is_neox) { - pos = (const int32_t *) src1_d; + pos = (const int32_t *) src1_d; + if (is_neox) { if (src2 != nullptr) { freq_factors = (const float *) src2->data; }