]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
tests : fix test-grad0
authorGeorgi Gerganov <redacted>
Wed, 5 Jul 2023 17:20:05 +0000 (20:20 +0300)
committerGeorgi Gerganov <redacted>
Wed, 5 Jul 2023 17:20:25 +0000 (20:20 +0300)
scripts/sync-ggml.sh
tests/test-grad0.c

index 574e5180b4b17f44f3ce48cf1c93f3bba093d016..02ea6ec15241bdcdca2011253542fb1ee69c658c 100755 (executable)
@@ -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
index b5a499c1db57e4dae69d92df31f5b4f32498b16a..a3e25214b84eb29766ff2a879d7d40edcdaf3fc1 100644 (file)
@@ -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);