I want to convert the ShiftResNet PyTorch C++ layer (https://github.com/peterhj/shiftnet_cuda_v2) from its PyTorch 0.3 C++ form to the current PyTorch 1.0 form. I want to know what are the API changes that I should be wary about.
For instance in the code
the author makes use of <THC/THC.h> header but in the tutorial Custom C++ and CUDA extension <ATen/ATen.h> has been used. How should I make the changes?
It would be great if I could get a migration guide similar to the one PyTorch developers wrote for migrating to PyTorch 0.3
P.S I am an old user of PyTorch Python API but I am starting with C++ part of this framework.
It seems like THC/THC.h is still there and you can still include it in your project.
Looking at “pytorch/aten/src/THC/generic/THCTensor.h”, it looks like all THCudaTensor_ should be changed to THCTensor_, but that’s just a guess.
I personally have only used at::Tensor from ATen throughout my code so I’m not sure I can help you in case changing THCudaTensor_ to THCTensor_ did not help, but it would be helpful if you could try to build your code and reply with the error messages you’re getting.