Skip to content
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

No module named 'upfirdn2d_plugin' #37

Closed
SofianeBenkara opened this issue Feb 16, 2021 · 2 comments
Closed

No module named 'upfirdn2d_plugin' #37

SofianeBenkara opened this issue Feb 16, 2021 · 2 comments

Comments

@SofianeBenkara
Copy link

Hello,

When I start training, everything seems to work fine however I get the below message which does not interrupt the training

I am using Python 3.8,
torch==1.7.0+cu110 torchvision==0.8.1+cu110
and Cuda 11.0
my hardware is NVIDIA RTX 3090

No module named 'upfirdn2d_plugin'
  warnings.warn('Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:\n\n' + str(sys.exc_info()[1]))
Setting up PyTorch plugin "upfirdn2d_plugin"... Failed!
C:\Users\VENUM\Google Drive\PyTorch\stylegan2-ada-pytorch\torch_utils\ops\upfirdn2d.py:34: UserWarning: Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:
@nurpax
Copy link
Contributor

nurpax commented Feb 16, 2021

Please see #2 (comment)

Please reopen this bug if you can’t find a solution from related GitHub issues.

@nurpax nurpax closed this as completed Feb 16, 2021
nurpax pushed a commit that referenced this issue Feb 19, 2021
Print full traceback when custom extension build fails.

Also allow pytorch 1.9 so that this runs against pytorch upstream
devel builds.

issues #2, #28, #35, #37, #39
@xxxwuwq
Copy link

xxxwuwq commented Feb 24, 2021

I sovle this problem in ubuntu 16.04 by

$ apt install ninja

this is my error log before i install ninjia

Loading training set...

Num images:  10106
Image shape: [3, 256, 256]
Label shape: [0]

Constructing networks...
Setting up PyTorch plugin "bias_act_plugin"... Failed!
***//GAN/stylegan2-ada-pytorch/torch_utils/ops/bias_act.py:50: UserWarning: Failed to build CUDA kernels for bias_act. Falling back to slow reference implementation. Details:

Traceback (most recent call last):
  File "***//GAN/stylegan2-ada-pytorch/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 "***//GAN/stylegan2-ada-pytorch/torch_utils/custom_ops.py", line 110, in get_plugin
    torch.utils.cpp_extension.load(name=module_name, verbose=verbose_build, sources=sources, **build_kwargs)
  File "/miniconda/envs/***/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 969, in load
    return _jit_compile(
  File "/miniconda/envs/***/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1176, in _jit_compile
    _write_ninja_file_and_build_library(
  File "/miniconda/envs/***/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1251, in _write_ninja_file_and_build_library
    verify_ninja_availability()
  File "/miniconda/envs/***/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1306, in verify_ninja_availability
    raise RuntimeError("Ninja is required to load C++ extensions")
RuntimeError: Ninja is required to load C++ extensions

  warnings.warn('Failed to build CUDA kernels for bias_act. Falling back to slow reference implementation. Details:\n\n' + traceback.format_exc())
Setting up PyTorch plugin "upfirdn2d_plugin"... Failed!
***//GAN/stylegan2-ada-pytorch/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 "***//GAN/stylegan2-ada-pytorch/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 "***//GAN/stylegan2-ada-pytorch/torch_utils/custom_ops.py", line 110, in get_plugin
    torch.utils.cpp_extension.load(name=module_name, verbose=verbose_build, sources=sources, **build_kwargs)
  File "/miniconda/envs/***/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 969, in load
    return _jit_compile(
  File "/miniconda/envs/***/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1176, in _jit_compile
    _write_ninja_file_and_build_library(
  File "/miniconda/envs/***/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1251, in _write_ninja_file_and_build_library
    verify_ninja_availability()
  File "/miniconda/envs/***/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1306, in verify_ninja_availability
    raise RuntimeError("Ninja is required to load C++ extensions")
RuntimeError: Ninja is required to load C++ extensions

  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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants