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

Hi,

I am trying to run this github GAN:

I am trying to run in CMD on Windows 10:
python test.py --ckpt checkpoint/StyleCariGAN/001000.pt --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 "test.py", line 10, in <module>
    from invert import *
  File "C:\Users\nicol\StyleCariGAN\invert.py", line 12, in <module>
    from exaggeration_model import StyleCariGAN
  File "C:\Users\nicol\StyleCariGAN\exaggeration_model.py", line 7, in <module>
    from model import PixelNorm, EqualLinear, ConstantInput, StyledConv, ToRGB, ExaggerationLayer
  File "C:\Users\nicol\StyleCariGAN\model.py", line 13, in <module>
    from op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d
  File "C:\Users\nicol\StyleCariGAN\op\__init__.py", line 1, in <module>
    from .fused_act import FusedLeakyReLU, fused_leaky_relu
  File "C:\Users\nicol\StyleCariGAN\op\fused_act.py", line 15, in <module>
    os.path.join(module_path, "fused_bias_act_kernel.cu"),
  File "C:\Users\nicol\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\cpp_extension.py", line 1136, in load
    keep_intermediates=keep_intermediates)
  File "C:\Users\nicol\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\cpp_extension.py", line 1347, in _jit_compile
    is_standalone=is_standalone)
  File "C:\Users\nicol\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\cpp_extension.py", line 1445, in _write_ninja_file_and_build_library
    is_standalone=is_standalone)
  File "C:\Users\nicol\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\cpp_extension.py", 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\cpp_extension.py", 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.