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

Method GetAllocatedBytes

tensorflow/core/framework/tensor.cc:91–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89 TensorBuffer* root_buffer() override { return this; }
90
91 bool GetAllocatedBytes(size_t* out_bytes) const override {
92 if (alloc_->TracksAllocationSizes()) {
93 *out_bytes = alloc_->AllocatedSize(data());
94 return *out_bytes > 0;
95 } else {
96 return false;
97 }
98 }
99
100 void FillAllocationDescription(AllocationDescription* proto) const override {
101 void* data_ptr = data();

Callers

nothing calls this directly

Calls 3

dataFunction · 0.50
TracksAllocationSizesMethod · 0.45
AllocatedSizeMethod · 0.45

Tested by

no test coverage detected