-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to build CUDA kernels for upfirdn2d #94
Comments
As the message say
|
+1 |
|
I fixed this RuntimeError for myself today. However I'm not a professional programmer, so my advice is limited, but I can tell you what I did. I previously installed Anaconda3, CUDA Toolkit 11.8 and had already Visual Studio 2022 on my computer. These are the sources I used: |
Failed to build CUDA kernels for upfirdn2d....
`Traceback (most recent call last):
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\bias_act.py", line 48, in _init
_plugin = custom_ops.get_plugin('bias_act_plugin', sources=sources, extra_cuda_cflags=['--use_fast_math'])
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py", line 64, in get_plugin
raise RuntimeError(f'Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "{file}".')
RuntimeError: Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py".
warnings.warn('Failed to build CUDA kernels for bias_act. Falling back to slow reference implementation. Details:\n\n' + traceback.format_exc())
Registering hook for: b256
Setting up PyTorch plugin "upfirdn2d_plugin"... Failed!
C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py:34: UserWarning: Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:
Traceback (most recent call last):
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py", line 32, in _init
_plugin = custom_ops.get_plugin('upfirdn2d_plugin', sources=sources, extra_cuda_cflags=['--use_fast_math'])
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py", line 64, in get_plugin
raise RuntimeError(f'Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "{file}".')
RuntimeError: Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py".
warnings.warn('Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:\n\n' + traceback.format_exc())
Setting up PyTorch plugin "upfirdn2d_plugin"... Failed!
C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py:34: UserWarning: Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:
Traceback (most recent call last):
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py", line 32, in _init
_plugin = custom_ops.get_plugin('upfirdn2d_plugin', sources=sources, extra_cuda_cflags=['--use_fast_math'])
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py", line 64, in get_plugin
raise RuntimeError(f'Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "{file}".')
RuntimeError: Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py".
warnings.warn('Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:\n\n' + traceback.format_exc())
Setting up PyTorch plugin "upfirdn2d_plugin"... Failed!
C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py:34: UserWarning: Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:
Traceback (most recent call last):
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py", line 32, in _init
_plugin = custom_ops.get_plugin('upfirdn2d_plugin', sources=sources, extra_cuda_cflags=['--use_fast_math'])
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py", line 64, in get_plugin
raise RuntimeError(f'Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "{file}".')
RuntimeError: Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py".
warnings.warn('Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:\n\n' + traceback.format_exc())
Setting up PyTorch plugin "upfirdn2d_plugin"... Failed!
C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py:34: UserWarning: Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:
Traceback (most recent call last):
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py", line 32, in _init
_plugin = custom_ops.get_plugin('upfirdn2d_plugin', sources=sources, extra_cuda_cflags=['--use_fast_math'])
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py", line 64, in get_plugin
raise RuntimeError(f'Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "{file}".')
RuntimeError: Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py".
warnings.warn('Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:\n\n' + traceback.format_exc())
Setting up PyTorch plugin "upfirdn2d_plugin"... Failed!
C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py:34: UserWarning: Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:
Traceback (most recent call last):
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py", line 32, in _init
_plugin = custom_ops.get_plugin('upfirdn2d_plugin', sources=sources, extra_cuda_cflags=['--use_fast_math'])
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py", line 64, in get_plugin
raise RuntimeError(f'Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "{file}".')
RuntimeError: Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py".
warnings.warn('Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:\n\n' + traceback.format_exc())
Setting up PyTorch plugin "upfirdn2d_plugin"... Failed!
C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py:34: UserWarning: Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:
Traceback (most recent call last):
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py", line 32, in _init
_plugin = custom_ops.get_plugin('upfirdn2d_plugin', sources=sources, extra_cuda_cflags=['--use_fast_math'])
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py", line 64, in get_plugin
raise RuntimeError(f'Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "{file}".')
RuntimeError: Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py".
warnings.warn('Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:\n\n' + traceback.format_exc())
Setting up PyTorch plugin "upfirdn2d_plugin"... Failed!
C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py:34: UserWarning: Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:
Traceback (most recent call last):
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py", line 32, in _init
_plugin = custom_ops.get_plugin('upfirdn2d_plugin', sources=sources, extra_cuda_cflags=['--use_fast_math'])
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py", line 64, in get_plugin
raise RuntimeError(f'Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "{file}".')
RuntimeError: Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py".
warnings.warn('Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:\n\n' + traceback.format_exc())
Setting up PyTorch plugin "upfirdn2d_plugin"... Failed!
C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py:34: UserWarning: Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:
Traceback (most recent call last):
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py", line 32, in _init
_plugin = custom_ops.get_plugin('upfirdn2d_plugin', sources=sources, extra_cuda_cflags=['--use_fast_math'])
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py", line 64, in get_plugin
raise RuntimeError(f'Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "{file}".')
RuntimeError: Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py".
warnings.warn('Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:\n\n' + traceback.format_exc())
Setting up PyTorch plugin "upfirdn2d_plugin"... Failed!
C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py:34: UserWarning: Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:
Traceback (most recent call last):
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py", line 32, in _init
_plugin = custom_ops.get_plugin('upfirdn2d_plugin', sources=sources, extra_cuda_cflags=['--use_fast_math'])
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py", line 64, in get_plugin
raise RuntimeError(f'Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "{file}".')
RuntimeError: Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py".
warnings.warn('Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:\n\n' + traceback.format_exc())
Setting up PyTorch plugin "upfirdn2d_plugin"... Failed!
C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py:34: UserWarning: Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:
Traceback (most recent call last):
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py", line 32, in _init
_plugin = custom_ops.get_plugin('upfirdn2d_plugin', sources=sources, extra_cuda_cflags=['--use_fast_math'])
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py", line 64, in get_plugin
raise RuntimeError(f'Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "{file}".')
RuntimeError: Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py".
warnings.warn('Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:\n\n' + traceback.format_exc())
Setting up PyTorch plugin "upfirdn2d_plugin"... Failed!
C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py:34: UserWarning: Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:
Traceback (most recent call last):
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py", line 32, in _init
_plugin = custom_ops.get_plugin('upfirdn2d_plugin', sources=sources, extra_cuda_cflags=['--use_fast_math'])
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py", line 64, in get_plugin
raise RuntimeError(f'Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "{file}".')
RuntimeError: Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py".
warnings.warn('Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:\n\n' + traceback.format_exc())
Setting up PyTorch plugin "upfirdn2d_plugin"... Failed!
C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py:34: UserWarning: Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:
Traceback (most recent call last):
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py", line 32, in _init
_plugin = custom_ops.get_plugin('upfirdn2d_plugin', sources=sources, extra_cuda_cflags=['--use_fast_math'])
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py", line 64, in get_plugin
raise RuntimeError(f'Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "{file}".')
RuntimeError: Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py".
warnings.warn('Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:\n\n' + traceback.format_exc())
Setting up PyTorch plugin "upfirdn2d_plugin"... Failed!
C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py:34: UserWarning: Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:
Traceback (most recent call last):
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py", line 32, in _init
_plugin = custom_ops.get_plugin('upfirdn2d_plugin', sources=sources, extra_cuda_cflags=['--use_fast_math'])
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py", line 64, in get_plugin
raise RuntimeError(f'Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "{file}".')
RuntimeError: Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py".
warnings.warn('Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:\n\n' + traceback.format_exc())
Setting up PyTorch plugin "upfirdn2d_plugin"... Failed!
C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py:34: UserWarning: Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:
Traceback (most recent call last):
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\ops\upfirdn2d.py", line 32, in _init
_plugin = custom_ops.get_plugin('upfirdn2d_plugin', sources=sources, extra_cuda_cflags=['--use_fast_math'])
File "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py", line 64, in get_plugin
raise RuntimeError(f'Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "{file}".')
RuntimeError: Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "C:\Users\charl\miniconda3\envs\draggan\lib\site-packages\draggan\stylegan2\torch_utils\custom_ops.py".
warnings.warn('Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:\n\n' + traceback.format_exc())
Successfully loaded, starting gradio demo
Running on local URL: http://127.0.0.1:7860
To create a public link, set
share=True
inlaunch()
.`Could you please tell me how to fix this? It runs extremely slow
The text was updated successfully, but these errors were encountered: