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

Method free

tensorflow/compiler/tf2tensorrt/utils/trt_allocator.cc:92–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92void TRTDeviceAllocator::free(void* memory) noexcept {
93 VLOG(2) << "Deallocating @ " << memory;
94 // allocated memory adjusted for alignment, restore the original pointer
95 if (memory) {
96 auto alloc_mem = mem_map_.find(memory);
97 if (alloc_mem != mem_map_.end()) {
98 memory = alloc_mem->second;
99 mem_map_.erase(alloc_mem->first);
100 }
101 allocator_->DeallocateRaw(memory);
102 }
103}
104
105} // namespace tensorrt
106} // namespace tensorflow

Callers 15

mainFunction · 0.80
OpFreeMethod · 0.80
InvokeMethod · 0.80
TestPreluFloatFunction · 0.80
TestPreluQuantizedFunction · 0.80
TestConvFloatFunction · 0.80
TestConvQuantizedFunction · 0.80
TestElementwiseFloatFunction · 0.80
TestElementwiseBoolFunction · 0.80
TestSplitTwoOutputsFloatFunction · 0.80

Calls 4

findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45
DeallocateRawMethod · 0.45

Tested by 15

TestPreluFloatFunction · 0.64
TestPreluQuantizedFunction · 0.64
TestConvFloatFunction · 0.64
TestConvQuantizedFunction · 0.64
TestElementwiseFloatFunction · 0.64
TestElementwiseBoolFunction · 0.64
TestSplitTwoOutputsFloatFunction · 0.64
TestReshapeImplFunction · 0.64
TestPackTwoInputsFloatFunction · 0.64