torch-points3d / torch-points-kernels

Pytorch kernels for spatial operations on point clouds
MIT License
96 stars 25 forks source link

Trouble compiling #80

Closed Stakhan closed 3 years ago

Stakhan commented 3 years ago

Hi there, Thank you for the great work here !

I encountered the following error when compiling (either from the pip wheel or from the github repository):

D:\EAL\envs\tp3d\lib\site-packages\torch\include\pybind11\cast.h(1503): error: too few arguments for template template parameter "Tuple"
          detected during instantiation of class "pybind11::detail::tuple_caster<Tuple, Ts...> [with Tuple=std::pair, Ts=<T1, T2>]"
(1507): here

2 errors detected in the compilation of "cuda/src/chamfer_dist_gpu.cu".
error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.4\\bin\\nvcc.exe' failed with exit status 1

Here are more details about the config:

Any clue where it could come from ?

Thanks for your feedback.

Stakhan commented 3 years ago

As a quick (and dirty) fix, I avoided the compilation phase entirely: By downloading, extracting and copying to my site-packages folder the right python/CUDA/PyTorch combination of the precompiled binaries from this location : https://anaconda.org/csl170000/torch-points-kernels-test/files I suppose the conda repository is a work-in-progress.

CCInc commented 3 years ago

The conda repo is on my list to fix - however it seems you're using nvcc 11.4, which hasn't been tested with. We only support the nvcc versions that pytorch is built with (10.2 and 11.1 for the latest version). Let me know if you encounter the same error when using one of those versions.

Stakhan commented 3 years ago

Hi CCInc,

Thanks for your answer. I can report that downgrading to CUDA 11.1 solves the issue. It is compiling smoothly, both from the repository and from the pip wheel. Easy error, easy fix ^^ (Guess I got mislead by the fact that it would also compile fine with version 11.3 and that the CUDA download page incentivize the use of the latest version...)