Skip to content

Commit 1b6efea

Browse files
committed
tests : fix test-grad0
1 parent 1b107b8 commit 1b6efea

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

scripts/sync-ggml.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@ cp -rpv ../ggml/src/ggml-opencl.cpp ./ggml-opencl.cpp
88
cp -rpv ../ggml/src/ggml-metal.h ./ggml-metal.h
99
cp -rpv ../ggml/src/ggml-metal.m ./ggml-metal.m
1010
cp -rpv ../ggml/src/ggml-metal.metal ./ggml-metal.metal
11-
cp -rpv ../ggml/include/ggml/ggml.h ./ggml.h
11+
cp -rpv ../ggml/include/ggml/ggml.h ./ggml.h
12+
13+
cp -rpv ../ggml/tests/test-opt.c ./tests/test-opt.c
14+
cp -rpv ../ggml/tests/test-grad0.c ./tests/test-grad0.c

tests/test-grad0.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,7 @@ int main(int argc, const char ** argv) {
11541154
continue;
11551155
}
11561156

1157-
struct ggml_tensor * f = ggml_sum(ctx0, ggml_rope(ctx0, x[0], n_past, n_rot, mode));
1157+
struct ggml_tensor * f = ggml_sum(ctx0, ggml_rope(ctx0, x[0], n_past, n_rot, mode, 0));
11581158

11591159
GGML_PRINT_DEBUG("rope: n_past: %d n_rot: %d mode: %d\n", n_past, n_rot, mode);
11601160
check_gradient("rope", ctx0, x, f, ndims, nargs, 1e-2f, 1e-3f, INFINITY);

0 commit comments

Comments
 (0)