I am trying to follow this tutorial and make a simple c++ extension with CUDA backend.
My CPU implementation seems to work fine.
I am having trouble finding examples and documentation (it seems like things are constantly changing).
Specifically,
-
I see pytorch cuda functions getting
THCState *state
argument - where does this argument comes from? How can i get astate
for my function as well? -
state
is then converted tocudaStream_t stream = THCState_getCurrentStream(state);
For some reason,THCState_getCurrentStream
is no longer defined? How can I get thestream
from mystate
?
Thanks,