Skip to content

Commit d826821

Browse files
committed
fix
1 parent 6627422 commit d826821

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ggml/src/ggml.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3061,6 +3061,9 @@ struct ggml_tensor * ggml_reshape_2d(
30613061
int64_t ne0,
30623062
int64_t ne1) {
30633063
GGML_ASSERT(ggml_is_contiguous(a));
3064+
if (ggml_nelements(a) != ne0*ne1) {
3065+
GGML_LOG_ERROR("ggml_reshape_2d: number of elements mismatch name: %s\n", a->name);
3066+
}
30643067
GGML_ASSERT(ggml_nelements(a) == ne0*ne1);
30653068

30663069
const int64_t ne[2] = { ne0, ne1 };

0 commit comments

Comments
 (0)