| 267 | |
| 268 | template <typename ElemT> |
| 269 | port::Status ScopedDeviceMemory<ElemT>::Free() { |
| 270 | if (!wrapped_.is_null()) { |
| 271 | CHECK(allocator_ != nullptr) << "Owning pointer in inconsistent state"; |
| 272 | TF_RETURN_IF_ERROR(allocator_->Deallocate(device_ordinal_, wrapped_)); |
| 273 | } |
| 274 | wrapped_ = DeviceMemory<ElemT>{}; |
| 275 | return port::Status::OK(); |
| 276 | } |
| 277 | |
| 278 | } // namespace stream_executor |
| 279 |
nothing calls this directly
no test coverage detected