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

Function TFE_GetTFOutputFromTensorHandle

tensorflow/c/c_api_experimental.cc:826–841  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

824}
825
826TF_Output TFE_GetTFOutputFromTensorHandle(TFE_TensorHandle* handle,
827 TF_Status* status) {
828 if (TFE_TensorHandleIsConcrete(handle)) {
829 status->status =
830 tensorflow::errors::Internal("Not a symbolic tensor: ", handle);
831 return TF_Output{nullptr, -1};
832 }
833
834 auto* sym_tensor = handle->handle->getSymbolicTensor();
835 CHECK(sym_tensor != nullptr);
836 auto ret = TF_Output{sym_tensor->oper, sym_tensor->index};
837 VLOG(1) << "Retrieving " << getTF_OutputDebugString(ret)
838 << " from tensor handle " << handle;
839 CHECK_GE(sym_tensor->index, 0);
840 return ret;
841}
842
843TFE_TraceContext* TFE_NewTraceContext(TF_Graph* graph) {
844 return new TFE_TraceContext(graph);

Callers 1

TESTFunction · 0.85

Calls 3

InternalFunction · 0.85
getSymbolicTensorMethod · 0.80

Tested by 1

TESTFunction · 0.68