Unable to compile pointnet2 · Issue #108 · facebookresearch/votenet (github.com)
在这个issue中以及有人给出了较低torch版本的编译解决方案,但是最新的pytorch还需要进行一些代码修改。
修改如下:
错误1如上图,我们需要修改所有.cpp文件中涉及向cuda kernel传入Tensor数据指针的代码。
上图中有两处错误处,除了data<T>改为data_ptr<T>这处错误外,还有new_xyz(类型为at::Tensor)不需要.type().is_cuda(),直接.is_cuda()即可。
如果你懒得修改这么多处代码,我这里将我修改好的代码上传到github了,大家可以按需拿取