pointMLP-pytorch
pointMLP-pytorch copied to clipboard
Unable to import pointnet2_utils
Thanks for sharing. However I'm having trouble configuring the environment: Unable to import pointnet2_utils in pointnet2_modules.py
Thanks for sharing. first of all, I used colab to run this code.
%cd /content/pointMLP-pytorch-main/pointnet2_ops_lib
!python setup.py install --verbose
Before using the above command to install you must change the setup.py
file from lines 19-36 with the below code:
os.environ["TORCH_CUDA_ARCH_LIST"] = "7.5"
setup(
name="pointnet2_ops",
version=__version__,
author="Erik Wijmans",
packages=find_packages(),
install_requires=requirements,
ext_modules=[
CUDAExtension(
name="pointnet2_ops._ext",
sources=_ext_sources,
extra_compile_args={
"cxx": ["-O3"],
"nvcc": ["-O3", "-Xfatbin", "-compress-all", "-v"],
},
include_dirs=[osp.join(this_dir, _ext_src_root, "include")],
)
]
Also, before running the main code, you must modify the pointnet2_utils.py
file from lines 23 to 31 with the provided code below.
os.environ["TORCH_CUDA_ARCH_LIST"] = "7.5"
_ext = load(
"_ext",
sources=_ext_sources,
extra_include_paths=[osp.join(_ext_src_root, "include")],
extra_cflags=["-O3"],
extra_cuda_cflags=["-O3", "-Xfatbin", "-compress-all", "-v"],
with_cuda=True,
)
I hope you will successfully execute the code.