aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgi Gerganov <ggerganov@gmail.com>2023-07-05 20:20:05 +0300
committerGeorgi Gerganov <ggerganov@gmail.com>2023-07-05 20:20:25 +0300
commit1b6efeab829f3eeda5b39bd47624bb60b3531b88 (patch)
tree00332bd295a4cf8dd0736ed7f787a687c7224165
parent1b107b8550dced48dc5f41184640061354226b96 (diff)
tests : fix test-grad0
-rwxr-xr-xscripts/sync-ggml.sh5
-rw-r--r--tests/test-grad0.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/scripts/sync-ggml.sh b/scripts/sync-ggml.sh
index 574e518..02ea6ec 100755
--- a/scripts/sync-ggml.sh
+++ b/scripts/sync-ggml.sh
@@ -8,4 +8,7 @@ cp -rpv ../ggml/src/ggml-opencl.cpp ./ggml-opencl.cpp
cp -rpv ../ggml/src/ggml-metal.h ./ggml-metal.h
cp -rpv ../ggml/src/ggml-metal.m ./ggml-metal.m
cp -rpv ../ggml/src/ggml-metal.metal ./ggml-metal.metal
-cp -rpv ../ggml/include/ggml/ggml.h ./ggml.h
+cp -rpv ../ggml/include/ggml/ggml.h ./ggml.h
+
+cp -rpv ../ggml/tests/test-opt.c ./tests/test-opt.c
+cp -rpv ../ggml/tests/test-grad0.c ./tests/test-grad0.c
diff --git a/tests/test-grad0.c b/tests/test-grad0.c
index b5a499c..a3e2521 100644
--- a/tests/test-grad0.c
+++ b/tests/test-grad0.c
@@ -1154,7 +1154,7 @@ int main(int argc, const char ** argv) {
continue;
}
- struct ggml_tensor * f = ggml_sum(ctx0, ggml_rope(ctx0, x[0], n_past, n_rot, mode));
+ struct ggml_tensor * f = ggml_sum(ctx0, ggml_rope(ctx0, x[0], n_past, n_rot, mode, 0));
GGML_PRINT_DEBUG("rope: n_past: %d n_rot: %d mode: %d\n", n_past, n_rot, mode);
check_gradient("rope", ctx0, x, f, ndims, nargs, 1e-2f, 1e-3f, INFINITY);