| 590 | } |
| 591 | |
| 592 | static bool ggml_gallocr_is_allocated(ggml_gallocr_t galloc, struct ggml_tensor * t) { |
| 593 | return t->data != NULL // tensor data already set externally |
| 594 | || t->buffer // tensor on external buffer (but not yet allocated) |
| 595 | || ggml_gallocr_is_own(galloc, t); // tensor will be allocated by galloc |
| 596 | } |
| 597 | |
| 598 | // free the extra space at the end if the new tensor is smaller |
| 599 | static void ggml_gallocr_free_extra_space(ggml_gallocr_t galloc, struct ggml_tensor * node, struct ggml_tensor * parent) { |
no test coverage detected