Skip to content

Commit

Permalink
tests : fix test-grad0
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Jul 5, 2023
1 parent 1b107b8 commit 1b6efea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion scripts/sync-ggml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion tests/test-grad0.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1b6efea

Please sign in to comment.