Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to import pointnet2_utils #94

Open
vae-forever opened this issue Jan 23, 2024 · 1 comment
Open

Unable to import pointnet2_utils #94

vae-forever opened this issue Jan 23, 2024 · 1 comment

Comments

@vae-forever
Copy link

Thanks for sharing.
However I'm having trouble configuring the environment:
Unable to import pointnet2_utils in pointnet2_modules.py

@rezamoradi
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants