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

ImportError: No module named *_plugin... #291

Open
wwt123-star opened this issue Sep 16, 2023 · 3 comments
Open

ImportError: No module named *_plugin... #291

wwt123-star opened this issue Sep 16, 2023 · 3 comments

Comments

@wwt123-star
Copy link

When I run the train.py, it reports the ImportError of *_plugin. I had found the 'build.ninja' generated in the 'bias_act_plugin' and 'upfirdn2d_plugin' files but no 'bias_act.o', 'bias_act.cuda.o' and 'bias_act_plugin.pyd'. How can I solve these issues?

@asmile201711360030
Copy link

i hava the same question

@howard-liang-B
Copy link

I got this problem too


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!
/content/drive/MyDrive/StyleGAN/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 "/content/drive/MyDrive/StyleGAN/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 "/content/drive/MyDrive/StyleGAN/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 "/usr/local/lib/python3.7/dist-packages/torch/utils/cpp_extension.py", line 997, in load
keep_intermediates=keep_intermediates)
File "/usr/local/lib/python3.7/dist-packages/torch/utils/cpp_extension.py", line 1213, in _jit_compile
return _import_module_from_library(name, build_directory, is_python_module)
File "/usr/local/lib/python3.7/dist-packages/torch/utils/cpp_extension.py", line 1560, in _import_module_from_library
file, path, description = imp.find_module(module_name, [path])
File "/usr/lib/python3.7/imp.py", line 296, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named 'upfirdn2d_plugin'


@HuangCaichen
Copy link

I got this problem too

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! /content/drive/MyDrive/StyleGAN/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 "/content/drive/MyDrive/StyleGAN/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 "/content/drive/MyDrive/StyleGAN/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 "/usr/local/lib/python3.7/dist-packages/torch/utils/cpp_extension.py", line 997, in load keep_intermediates=keep_intermediates) File "/usr/local/lib/python3.7/dist-packages/torch/utils/cpp_extension.py", line 1213, in _jit_compile return _import_module_from_library(name, build_directory, is_python_module) File "/usr/local/lib/python3.7/dist-packages/torch/utils/cpp_extension.py", line 1560, in _import_module_from_library file, path, description = imp.find_module(module_name, [path]) File "/usr/lib/python3.7/imp.py", line 296, in find_module raise ImportError(_ERR_MSG.format(name), name=name) ImportError: No module named 'upfirdn2d_plugin'

have you solved it yet

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

4 participants