MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / PyTensorObject_grad_fn

Function PyTensorObject_grad_fn

oneflow/api/python/framework/tensor.cpp:673–675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

671}
672
673static PyObject* PyTensorObject_grad_fn(PyObject* self, void* unused) {
674 return functional::CastToPyObject(PyTensor_Unpack(self)->grad_fn_node());
675}
676
677static PyObject* PyTensorObject_is_leaf(PyObject* self, void* unused) {
678 return functional::CastToPyObject(PyTensor_Unpack(self)->is_leaf());

Callers

nothing calls this directly

Calls 2

CastToPyObjectFunction · 0.85
grad_fn_nodeMethod · 0.45

Tested by

no test coverage detected