hello,
I wanted to try the C++ module of PyTorch and I started with the very introduction of the module 3.
I installed cxx11 ABI and ran the code as mentioned. However, I got this error:
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 /home/sarvagya/Desktop/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):
  /home/sarvagya/Desktop/libtorch/share/cmake/Caffe2/Caffe2Config.cmake:88 (include)
  /home/sarvagya/Desktop/libtorch/share/cmake/Torch/TorchConfig.cmake:40 (find_package)
  CMakeLists.txt:4 (find_package)


CMake Error at /home/sarvagya/Desktop/libtorch/share/cmake/Caffe2/Caffe2Config.cmake:90 (message):
  Your installed Caffe2 version uses CUDA but I cannot find the CUDA
  libraries.  Please set the proper CUDA prefixes and / or install CUDA.
Call Stack (most recent call first):
  /home/sarvagya/Desktop/libtorch/share/cmake/Torch/TorchConfig.cmake:40 (find_package)
  CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/sarvagya/Desktop/cpp/dcgan/build/CMakeFiles/CMakeOutput.log".
See also "/home/sarvagya/Desktop/cpp/dcgan/build/CMakeFiles/CMakeError.log".

So I wanted to know how do I set CUDA variable.
I also wanted to ask one more thing. I have installed the cuda toolkit through anaconda for PyTorch. So if I set the environment variable to that CUDA, will it work?