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

Function GetPyEagerContext

tensorflow/python/eager/pywrap_tfe_src.cc:3521–3533  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3519}
3520
3521PyObject* GetPyEagerContext() {
3522 if (weak_eager_context == nullptr) {
3523 PyErr_SetString(PyExc_RuntimeError, "Python eager context is not set");
3524 return nullptr;
3525 }
3526 PyObject* py_context = PyWeakref_GET_OBJECT(weak_eager_context);
3527 if (py_context == Py_None) {
3528 PyErr_SetString(PyExc_RuntimeError, "Eager context has been destroyed");
3529 return nullptr;
3530 }
3531 Py_INCREF(py_context);
3532 return py_context;
3533}

Callers 2

EagerTensor_initFunction · 0.85
EagerTensorFromHandleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected