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

Method GetScopedAllocator

tensorflow/core/common_runtime/threadpool_device.cc:100–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100Allocator* ThreadPoolDevice::GetScopedAllocator(AllocatorAttributes attr,
101 int64 step_id) {
102 if (attr.scope_id > 0) {
103 return scoped_allocator_mgr_->GetContainer(step_id)->GetInstance(
104 attr.scope_id);
105 }
106 LOG(FATAL) << "Unexpected call to ThreadPoolDevice::GetScopedAllocator "
107 << "attr.scope_id = " << attr.scope_id;
108 return allocator_;
109}
110
111Status ThreadPoolDevice::MakeTensorFromProto(
112 const TensorProto& tensor_proto, const AllocatorAttributes alloc_attrs,

Callers 1

MakeOpMethod · 0.45

Calls 2

GetContainerMethod · 0.80
GetInstanceMethod · 0.45

Tested by 1

MakeOpMethod · 0.36