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

Method Free

tensorflow/stream_executor/device_memory_allocator.h:269–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

267
268template <typename ElemT>
269port::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

Callers

nothing calls this directly

Calls 2

is_nullMethod · 0.45
DeallocateMethod · 0.45

Tested by

no test coverage detected