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

Method BigDeallocate

tensorflow/core/common_runtime/tensorpool_allocator.cc:392–408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390}
391
392void TensorPoolAllocator::BigDeallocate(Header* header) {
393 auto ptr = header->raw_ptr;
394 auto num_bytes = header->total_size;
395 if (!inited_.load()) {
396 mem_planner_->TrackDeallocate(header);
397 sub_allocator_->Free(ptr, num_bytes);
398 return;
399 }
400
401 if (header->bin == nullptr) {
402 sub_allocator_->Free(ptr, num_bytes);
403 return;
404 }
405
406 auto bin = (Bin*) (header->bin);
407 bin->Deallocate(header);
408}
409
410class TensorPoolAllocatorFactory : public AllocatorFactory {
411 public:

Callers

nothing calls this directly

Calls 4

loadMethod · 0.45
TrackDeallocateMethod · 0.45
FreeMethod · 0.45
DeallocateMethod · 0.45

Tested by

no test coverage detected