| 131 | } |
| 132 | |
| 133 | XRTBufferAllocation::~XRTBufferAllocation() { |
| 134 | if (VLOG_IS_ON(2)) { |
| 135 | GetAllocStats()->ReportFree(device_ordinal_, allocation_.size()); |
| 136 | } |
| 137 | // Deallocate explicitly allows allocation_ to be null. |
| 138 | TF_CHECK_OK(allocator_->Deallocate(device_ordinal_, allocation_)); |
| 139 | VLOG(2) << "Freed buffer at " << allocation_.opaque() << " (" |
| 140 | << allocation_.size() << " bytes)"; |
| 141 | } |
| 142 | |
| 143 | const se::DeviceMemoryBase& XRTBufferAllocation::allocation() { |
| 144 | return allocation_; |
nothing calls this directly
no test coverage detected