Why the python object doesn't move? #3279
Unanswered
leslie-fang-intel
asked this question in
Q&A
Replies: 1 comment
-
Hi @wjakob, Could you kindly help to take a look of this question? I see some similar answer but not exactly what I am confused. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to write some C++ function for Pytorch and wrap with pybind11.
Here is a class I defined and exposed through pybind11:
Since in the
submit
, I am passingargs
by reference and doing thestd::move()
forargs
.Here inside
submit
function,args
should be not implemented afterstd::move
.But why in the python side, the tensor X still exist?
Beta Was this translation helpful? Give feedback.
All reactions