Import Error when setting up PyTorch plugin "filtered_lrelu_plugin"...
Author: lulujianjieCreated Feb 7, 2022Updated Mar 22, 2025
Describe the bug I was using the docker you provided, but faced with Import Error when setting up PyTorch plugin "filtered_lrelu_plugin"...
To Reproduce Steps to reproduce the behavior:
- run command 'python gen_images.py --outdir=out --trunc=1 --seeds=2 --network=/share/pretrained_models/stylegan3-r-afhqv2-512x512.pkl'
- See error:
ImportError: /home/jack/.cache/torch_extensions/filtered_lrelu_plugin/92f8f11ba16e0d8f24bcd6b7e2799d51-nvidia-geforce-rtx-3060/filtered_lrelu_plugin.so: undefined symbol: _Z28choose_filtered_lrelu_kernelIN3c104HalfElLb1ELb0EE26filtered_lrelu_kernel_specRK28filtered_lrelu_kernel_paramsi
Desktop
- OS: Linux Ubuntu 20.04
- PyTorch: 1.9.0+cu111
- CUDA toolkit version: CUDA 11.1
- NVIDIA driver version: 470.94
- GPU: RTX 3060 12G
- Docker: nvcr.io/nvidia/pytorch:21.08-py3
By the way, the same problem occurs when I try to use host env instead of docker.
Source: NVlabs/stylegan3