pmh47 / dirt

DIRT: a fast differentiable renderer for TensorFlow
MIT License
312 stars 63 forks source link

Error during make: nvcc fatal : Value 'sm_20' is not defined for option 'gpu-architecture' #86

Closed arkadeepnc closed 3 years ago

arkadeepnc commented 3 years ago

This error is caused because of the line set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -arch=sm_30 --expt-relaxed-constexpr -DNDEBUG") in CMakeLists.txt.

Source of error: Mismatch of cuda nvcc compiler and cuda toolkit installed. This is most likely caused if the cuda toolkit is installed manually and not from sudo apt-get install nvidia-cuda-toolkit.

Solution: Replace the line in CMAkeList.txt with set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -arch=sm_XX --expt-relaxed-constexpr -DNDEBUG") where sm_XX is the correct value from this Page. E.g. for a RTX2060 with CUDA 11.1 -- sm_75