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

Function TFE_GetPythonString

tensorflow/python/eager/pywrap_tfe_src.cc:900–910  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

898}
899
900const char* TFE_GetPythonString(PyObject* o) {
901#if PY_MAJOR_VERSION >= 3
902 if (PyBytes_Check(o)) {
903 return PyBytes_AsString(o);
904 } else {
905 return PyUnicode_AsUTF8(o);
906 }
907#else
908 return PyBytes_AsString(o);
909#endif
910}
911
912int64_t get_uid() {
913 tensorflow::mutex_lock l(_uid_mutex);

Callers 7

TFE_Py_TapeGradientFunction · 0.85
RecordGradientFunction · 0.85
GetOpDefFunction · 0.85
GetDeviceNameFunction · 0.85
TFE_Py_FastPathExecute_CFunction · 0.85
ConvertDeviceNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected