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

Method VirtualBuffer

tensorflow/core/common_runtime/tensorpool_allocator.cc:268–279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266}
267
268TensorPoolAllocator::VirtualBuffer::VirtualBuffer(
269 std::vector<VirtualAllocBlock*>& vblocks,
270 TensorPoolAllocator* tp) {
271 for (auto vblock : vblocks) {
272 auto bin_index = vblock->BinIndex();
273 auto internal_bin = tp->GetBin(bin_index);
274 if (internal_bin == nullptr) {
275 LOG(WARNING) << "logic error or not allocate correctly";
276 }
277 internal_bins_.emplace(internal_bin);
278 }
279}
280
281std::pair<void*, TensorPoolAllocator::Bin*>
282TensorPoolAllocator::VirtualBuffer::Allocate() {

Callers

nothing calls this directly

Calls 3

BinIndexMethod · 0.45
GetBinMethod · 0.45
emplaceMethod · 0.45

Tested by

no test coverage detected