I set the environment variable NO_CUDA as 1 in my windows OS. It is not working. CMake still asked me cuda stuff.
The error message is following
– Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.18363.
CUDA_TOOLKIT_ROOT_DIR not found or specified
– Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY)
CMake Warning at C:/libtorch/share/cmake/Caffe2/public/cuda.cmake:31 (message):
Caffe2: CUDA cannot be found.  Depending on whether you are building Caffe2
or a Caffe2 dependent library, the next warning / error will give you more
info.
Call Stack (most recent call first):
C:/libtorch/share/cmake/Caffe2/Caffe2Config.cmake:88 (include)
C:/libtorch/share/cmake/Torch/TorchConfig.cmake:40 (find_package)
CMakeLists.txt:4 (find_package)