No CUDA runtime is found even though I have both CUDA 10.2 and 11.5 toolkits!


I am trying to run this github GAN:

I am trying to run in CMD on Windows 10:
python --ckpt checkpoint/StyleCariGAN/ --input_dir examples/samples --output_dir examples/results --invert_images

However, the following error occurs:

No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2'
Traceback (most recent call last):
  File "", line 10, in <module>
    from invert import *
  File "C:\Users\nicol\StyleCariGAN\", line 12, in <module>
    from exaggeration_model import StyleCariGAN
  File "C:\Users\nicol\StyleCariGAN\", line 7, in <module>
    from model import PixelNorm, EqualLinear, ConstantInput, StyledConv, ToRGB, ExaggerationLayer
  File "C:\Users\nicol\StyleCariGAN\", line 13, in <module>
    from op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d
  File "C:\Users\nicol\StyleCariGAN\op\", line 1, in <module>
    from .fused_act import FusedLeakyReLU, fused_leaky_relu
  File "C:\Users\nicol\StyleCariGAN\op\", line 15, in <module>
    os.path.join(module_path, ""),
  File "C:\Users\nicol\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\", line 1136, in load
  File "C:\Users\nicol\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\", line 1347, in _jit_compile
  File "C:\Users\nicol\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\", line 1445, in _write_ninja_file_and_build_library
  File "C:\Users\nicol\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\", line 1834, in _write_ninja_file_to_build_library
    cuda_flags = common_cflags + COMMON_NVCC_FLAGS + _get_cuda_arch_flags()
  File "C:\Users\nicol\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\", line 1606, in _get_cuda_arch_flags
    arch_list[-1] += '+PTX'
IndexError: list index out of range

I believe the CUDA_HOME PATH is completely wrong, but do not know what to set it as…
I have all the required pip installs, and as previously mentioned, have both CUDA 10.2 and 11.5 toolkits from NVIDIA. I am also using an RTX 3080.

Thank you in advance! I’m trying very hard to get this working!

Hi @user22541,
This forum is dedicated to discussions related to debugging with CUDA-GDB . For installation questions, you may have better luck in the CUDA Setup and Installation - NVIDIA Developer Forums forum.

I have moved your post there.