We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c8e0d7 commit efef1a8Copy full SHA for efef1a8
1 file changed
torch/csrc/autograd/utils/wrap_outputs.h
@@ -52,10 +52,18 @@ inline PyObject* wrap(void* value) {
52
return THPUtils_packInt64(reinterpret_cast<intptr_t>(value));
53
}
54
55
+inline PyObject* wrap(THPDtype* dtype) {
56
+ return Py_NewRef(dtype);
57
+}
58
+
59
inline PyObject* wrap(at::ScalarType scalarType) {
60
return Py_NewRef(getTHPDtype(scalarType));
61
62
63
+inline PyObject* wrap(THPLayout* layout) {
64
+ return Py_NewRef(layout);
65
66
67
inline PyObject* wrap(at::Layout layout) {
68
return Py_NewRef(getTHPLayout(layout));
69
0 commit comments