summaryrefslogtreecommitdiff
path: root/ggml-cuda
diff options
context:
space:
mode:
authorGeorgi Gerganov <ggerganov@gmail.com>2024-05-22 11:01:35 +0300
committerGitHub <noreply@github.com>2024-05-22 11:01:35 +0300
commit3e5faa85032ec3106a2ad831bf412be9ff139f47 (patch)
treedc85a6e015eecb4c771bffd6d3c4202459edaa9a /ggml-cuda
parent201cc11afa0a1950e1f632390b2ac6c937a0d8f0 (diff)
cuda : fix rope + add tests (#7452)
* cuda : fix rope pos data ggml-ci * ggml : drop mode & 1 == 1 support for ggml_rope ggml-ci * ggml : support freq_factors for f16 rope (CPU) ggml-ci * tests : add rope tests using frequency factors ggml-ci
Diffstat (limited to 'ggml-cuda')
-rw-r--r--ggml-cuda/rope.cu4
1 files changed, 2 insertions, 2 deletions
diff --git a/ggml-cuda/rope.cu b/ggml-cuda/rope.cu
index 4a558f4b..50f2cf41 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;
}