Closed jgvinholi closed 2 weeks ago
I would strongly advise against using that branch. Torch compile support is not yet stable, and that branch is not yet ready to merge.
As for your issues with building NATTEN from source, I'm afraid it's because the only detected CUDA toolkit in your environment is CTK 10.1, but NATTEN requires 11.0 and above.
Compilation is not only a matter of where nvcc
is, you'd need to have the "correct" version of CTK loaded into your environment variables so that cmake can also pick up the include and lib dirs so that it can build and link.
NATTEN simply uses FindCUDA.cmake, which is the standard way of finding CTK and the cuda driver, and its behavior is just out of our control.
Yes, the cuda toolkit version used by /usr/bin/nvcc is 10.1, which is unsupported. But what I suggest is to tell cmake to use the nvcc version located in CUDA_HOME
env var, since many people like me use the cuda toolkit/nvcc obtained directly from conda. This could be a flag added to cmake that could be added to setup.py. Of course I could install an updated cuda toolkit in my system, but it might not be ideal to change the system cuda toolkit as other packages might have different requirements. Thank you for your time.
Unfortunately it's not that simple. You don't just need a compiler, you also need the cuda include dirs to be able to compile, and linking with cuda runtime and pytorch post-compilation. CMake handles a lot of this through packages like FindCUDA (and this is done with most such projects and not unique to NATTEN; pytorch uses FindCUDA), and the behavior of FindCUDA is unfortunately out of our control.
I recommend either setting your environment variables in a way that cmake accepts them, or just downloading the latest release which doesn't require you to build anything.
If you're installing CTK through conda, then you shouldn't have to modify any environment variables; conda should do that for you.
Thank you for clearing this up. I will try to check my conda installation and see what is going on.
Hi, trying to compile from source to try the branch that supports torch.compile https://github.com/alihassanijr/NATTEN-Torch/tree/fix-torch-compile-pt24, however it is not possible to compile because cmake is using the nvcc that is located in /usr/bin/nvcc, even when I set the CUDA_HOME environment variable correctly to the conda-installed version in miniconda3/envs/env_name/bin/ . Maybe in setup.py a flag should be passed to cmake to explicitly tell where nvcc is located according to the CUDA_HOME or other env variable. Here is the output of
pip install git+https://github.com/alihassanijr/NATTEN-Torch.git
: