I am trying to follow this tutorial 8 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 a state for my function as well?


state is then converted to cudaStream_t stream = THCState_getCurrentStream(state); For some reason, THCState_getCurrentStream is no longer defined? How can I get the stream from my state?


Thanks,