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

Function FastTensorId

tensorflow/python/eager/pywrap_tfe_src.cc:933–944  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

931}
932
933static tensorflow::int64 FastTensorId(PyObject* tensor) {
934 if (EagerTensor_CheckExact(tensor)) {
935 return PyEagerTensor_ID(tensor);
936 }
937 PyObject* id_field = PyObject_GetAttrString(tensor, "_id");
938 if (id_field == nullptr) {
939 return -1;
940 }
941 tensorflow::int64 id = MakeInt(id_field);
942 Py_DECREF(id_field);
943 return id;
944}
945
946static tensorflow::DataType FastTensorDtype(PyObject* tensor) {
947 if (EagerTensor_CheckExact(tensor)) {

Callers 8

TensorIdMethod · 0.85
WatchVariableMethod · 0.85
TensorShapesAndDtypesFunction · 0.85
TFE_Py_TapeWatchFunction · 0.85
TapeTensorFromTensorFunction · 0.85
MakeTensorIDListFunction · 0.85

Calls 2

PyEagerTensor_IDFunction · 0.85
MakeIntFunction · 0.85

Tested by

no test coverage detected