ggml : ggml_repeat always creates new tensor

This commit is contained in:
Georgi Gerganov 2023-08-23 10:42:02 +03:00
parent 99bb26078f
commit af4bbcc873
No known key found for this signature in database
GPG key ID: 449E073F9DC10735

4
ggml.c
View file

@ -5555,10 +5555,6 @@ struct ggml_tensor * ggml_repeat(
is_node = true; is_node = true;
} }
if (ggml_are_same_shape(a, b) && !is_node) {
return a;
}
struct ggml_tensor * result = ggml_new_tensor(ctx, a->type, b->n_dims, b->ne); struct ggml_tensor * result = ggml_new_tensor(ctx, a->type, b->n_dims, b->ne);
result->op = GGML_OP_REPEAT; result->op = GGML_OP_REPEAT;