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

Method TryGetDeviceContext

tensorflow/core/common_runtime/device.h:159–162  ·  view source on GitHub ↗

Sets `out_context` a new DeviceContext* for executing a graph, or nullptr if the device does not support contexts. Returns an error status if any error occurred while trying to create a context, otherwise OK. The caller takes ownership of one reference on the output DeviceContext*, and should call Unref().

Source from the content-addressed store, hash-verified

157 // The caller takes ownership of one reference on the output DeviceContext*,
158 // and should call Unref().
159 virtual Status TryGetDeviceContext(DeviceContext** out_context) {
160 *out_context = nullptr;
161 return Status::OK();
162 }
163
164 // Returns the op segment of this device. The caller can reuse op
165 // kernels registered for the same session running on this device.

Callers 1

RunAsyncMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected