adamchang2000 commented on 23 Feb 2021
Found a fix:1. change all instances of AT_CHECK to TORCH_CHECK inside all the 2. source files inside pointnet2/_ext_src/src and pointnet2/_ext_src/include. This is due to an API change in PyTorch.
change pointnet2/setup.py:# Copyright (c) Facebook, Inc. and its affiliates.# # This source code is licensed under the MIT license found in the# LICENSE file in the root directory of this source tree.from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
import glob
import os
_ext_src_root ="_ext_src"
_ext_sources = glob.glob("{}/src/*.cpp".format(_ext_src_root))+ glob.glob("{}/src/*.cu".format(_ext_src_root))
_ext_headers = glob.glob("{}/include/*".format(_ext_src_root))
headers ="-I"+ os.path.join(os.path.dirname(os.path.abspath(__file__)),'_ext_src','include')
setup(
name='pointnet2',
ext_modules=[
CUDAExtension(
name='pointnet2._ext',
sources=_ext_sources,
extra_compile_args={"cxx":["-O2", headers],"nvcc":["-O2", headers]},)],
cmdclass={'build_ext': BuildExtension
})