| 452 | } |
| 453 | |
| 454 | static bool are_same_layout(struct ggml_tensor * a, struct ggml_tensor * b) { |
| 455 | GGML_ASSERT(a != NULL); |
| 456 | GGML_ASSERT(b != NULL); |
| 457 | GGML_ASSERT(a->type == b->type); |
| 458 | GGML_ASSERT(ggml_are_same_shape(a, b)); |
| 459 | GGML_ASSERT(ggml_is_contiguous(a) && ggml_is_contiguous(b)); |
| 460 | |
| 461 | return true; |
| 462 | } |
| 463 | |
| 464 | void copy_tensor_by_name(struct ggml_tensor * dst, struct ggml_context * ctx, const char * name) { |
| 465 | if (dst == NULL) { |
no test coverage detected