This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Description
e.g.: pytorch/torch/csrc/autograd/python_variable.cpp
static PyObject* THPVariable_make_subclass(PyObject* _ignored, PyObject* args, PyObject* kwargs) {
...
auto data = r.tensor(1).detach();
That r.tensor(1) copies the tensor and then detaches. Unnecessary copy.
PythonArgs::optionalTensor should be changed to return a null/non-null ptr instead of optional