MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / add_allocated_tensor

Function add_allocated_tensor

ggml-alloc.c:51–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50#ifdef GGML_ALLOCATOR_DEBUG
51static void add_allocated_tensor(ggml_tallocr_t alloc, struct ggml_tensor * tensor) {
52 for (int i = 0; i < 1024; i++) {
53 if (alloc->allocated_tensors[i] == NULL) {
54 alloc->allocated_tensors[i] = tensor;
55 return;
56 }
57 }
58 GGML_ASSERT(!"out of allocated_tensors");
59}
60static void remove_allocated_tensor(ggml_tallocr_t alloc, struct ggml_tensor * tensor) {
61 for (int i = 0; i < 1024; i++) {
62 if (alloc->allocated_tensors[i] == tensor ||

Callers 1

ggml_tallocr_allocFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected