from torch.utils.ffi import _wrap_function
File "/usr/local/lib/python3.6/dist-packages/torch/utils/ffi/__init__.py", line 1, in <module>
raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.
Thank u for your reply. I already change into cpp extension, but the older codes has some wrapper using this function. It seems the old code can not word anymore.
But I need a wrapper for some cuda extensions, here is my attempt
You also need to port your C code from TH/THC to ATen.
I’d recommend to get it working using the just in time extension compilation first and then proceed to the setup.py. In the tutorial linked above, the mechanism to compile the module there is:
from torch.utils.cpp_extension import load
lltm = load(name='lltm', sources=['lltm_cuda.cpp', 'lltm_cuda_kernel.cu'])
Once that works, moving to setup.py should be straightforward.