| 188 | GGML_ABORT("out of allocated_tensors"); |
| 189 | } |
| 190 | static void remove_allocated_tensor(struct ggml_dyn_tallocr * alloc, struct buffer_address addr, const struct ggml_tensor * tensor) { |
| 191 | for (int i = 0; i < 1024; i++) { |
| 192 | if (alloc->allocated_tensors[i].addr.chunk == addr.chunk && alloc->allocated_tensors[i].addr.offset == addr.offset) { |
| 193 | alloc->allocated_tensors[i].tensor = NULL; |
| 194 | return; |
| 195 | } |
| 196 | } |
| 197 | GGML_ABORT("tried to free tensor %s not found\n", tensor->name); |
| 198 | } |
| 199 | #endif |
| 200 | |
| 201 | static struct buffer_address ggml_dyn_tallocr_alloc(struct ggml_dyn_tallocr * alloc, size_t size, const struct ggml_tensor * tensor) { |
no outgoing calls
no test coverage detected