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

Method XRTBufferAllocation

tensorflow/compiler/xrt/xrt_state.cc:119–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117} // namespace
118
119XRTBufferAllocation::XRTBufferAllocation(const se::DeviceMemoryBase& allocation,
120 int device_ordinal,
121 se::DeviceMemoryAllocator* allocator)
122 : allocation_(allocation),
123 device_ordinal_(device_ordinal),
124 allocator_(allocator) {
125 if (VLOG_IS_ON(2)) {
126 auto stats =
127 GetAllocStats()->ReportAlloc(device_ordinal_, allocation_.size());
128 LOG(INFO) << "XRT Allocation Stats: device=" << device_ordinal_
129 << " count=" << stats.count << " size=" << stats.size;
130 }
131}
132
133XRTBufferAllocation::~XRTBufferAllocation() {
134 if (VLOG_IS_ON(2)) {

Callers

nothing calls this directly

Calls 3

GetAllocStatsFunction · 0.85
ReportAllocMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected