MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / deallocate_buffer

Function deallocate_buffer

tensorflow/c/tf_tensor.cc:49–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49void deallocate_buffer(void* data, size_t len, void* arg) {
50 Allocator* allocator = nullptr;
51 if (arg == nullptr) {
52 allocator = cpu_allocator();
53 } else {
54 allocator = reinterpret_cast<Allocator*>(arg);
55 }
56 if (LogMemory::IsEnabled() && data != nullptr) {
57 LogMemory::RecordRawDeallocation(
58 "TensorFlow C Api", LogMemory::EXTERNAL_TENSOR_ALLOCATION_STEP_ID, data,
59 allocator, false);
60 }
61 allocator->DeallocateRaw(data);
62}
63} // namespace tensorflow
64
65namespace {

Callers

nothing calls this directly

Calls 3

cpu_allocatorFunction · 0.85
IsEnabledFunction · 0.85
DeallocateRawMethod · 0.45

Tested by

no test coverage detected