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

Function make_safe

tensorflow/compiler/xla/python/bfloat16.cc:45–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43// the contained object will be decremented.
44using Safe_PyObjectPtr = std::unique_ptr<PyObject, PyDecrefDeleter>;
45Safe_PyObjectPtr make_safe(PyObject* object) {
46 return Safe_PyObjectPtr(object);
47}
48
49// Workarounds for Python 2 vs 3 API differences.
50#if PY_MAJOR_VERSION < 3

Callers 4

PyBfloat16_FromBfloat16Function · 0.70
CastToBfloat16Function · 0.70
RegisterUFuncFunction · 0.70
InitializeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected