若出现出现ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.则可将其用torch.utils.cpp_extension替换
所以
from torch.utils.cpp_extension import BuildExtension
替换为from torch.utils.ffi import create_extension
另外还要将代码中的create_extension改为BuildExtension
网友评论