lfranke / TRIPS

https://lfranke.github.io/trips/
MIT License
495 stars 28 forks source link

Compile error #4

Closed henrypearce4D closed 4 months ago

henrypearce4D commented 4 months ago

Getting an error when running; cmake -Bbuild -DCMAKE_CUDA_COMPILER="$ENV:CUDA_PATH\bin\nvcc.exe" -DCMAKE_PREFIX_PATH=".\External\libtorch" -DCONDA_P_PATH="$ENV:CONDA_PREFIX" -DCUDA_P_PATH="$ENV:CUDA_PATH" -DCMAKE_BUILD_TYPE=RelWithDebInfo .

CMake Error at External/saiga/cmake/Dependencies_cuda.cmake:21 (enable_language):
  The CMAKE_CUDA_COMPILER:

    $ENV:CUDA_PATH\bin\nvcc.exe

  is not a full path and was not found in the PATH.

Call Stack (most recent call first):
  External/saiga/CMakeLists.txt:154 (include)

-- Configuring incomplete, errors occurred!

I have CUDA_PATH set as C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8 And C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin set in my path variable.

Any suggestions?

MikeJPelton commented 4 months ago

Just a guess but the spaces in the path might be tripping it up? You could try adding speech marks to book-end your CUDA path. Also cmake and back slashes has caused me trouble in the past....

lfranke commented 4 months ago

Thats odd. Which shell and OS are you using?

As a quick fix, you could probably exchange the $ENV:CUDA_PATH part with C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8 in both -DCMAKE_CUDA_COMPILER and DCUDA_P_PATH

Also maybe remove the build folder and retry, cmake stores compiler information there.

henrypearce4D commented 4 months ago

I'm using conda and windows 10.

Exchanging those parts it started to compile then shows a CuDNN error. That was mentioned as a software requirement in the Windows install but not instructions so I skipped past it. Installing CuDNN and that exchange to cuda_path its now compiling.

I've added a PR for those extra notes as part of the install process.

tridemax commented 4 months ago

Just replace $ENV:CUDA_PATH with %CUDA_PATH%.

henrypearce4D commented 4 months ago

@tridemax thanks!

I had to also change $ENV:CONDA_PREFIX with %CONDA_PREFIX% and got it to compile!

cmake -Bbuild -DCMAKE_CUDA_COMPILER="%CUDA_PATH%\bin\nvcc.exe" -DCMAKE_PREFIX_PATH=".\External\libtorch" -DCONDA_P_PATH="%CONDA_PREFIX%" -DCUDA_P_PATH="%CUDA_PATH%" -DCMAKE_BUILD_TYPE=RelWithDebInfo .

@lfranke changes have been added to the PR