orpatashnik / StyleCLIP

Official Implementation for "StyleCLIP: Text-Driven Manipulation of StyleGAN Imagery" (ICCV 2021 Oral)
MIT License
4.01k stars 562 forks source link

Setting up TensorFlow plugin "fused_bias_act.cu": Failed! #67

Open c1a1o1 opened 3 years ago

c1a1o1 commented 3 years ago

/mnt/anaconda/bin/python3.7 /mnt/StyleCLIP-main/global_directions/GetCode.py 2021-09-28 02:44:08.434424: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcudart.so.10.0'; dlerror: libcudart.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64 2021-09-28 02:44:08.434559: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcublas.so.10.0'; dlerror: libcublas.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64 2021-09-28 02:44:08.434671: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcufft.so.10.0'; dlerror: libcufft.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64 2021-09-28 02:44:08.434781: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcurand.so.10.0'; dlerror: libcurand.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64 2021-09-28 02:44:08.434887: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcusolver.so.10.0'; dlerror: libcusolver.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64 2021-09-28 02:44:08.434993: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcusparse.so.10.0'; dlerror: libcusparse.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64 2021-09-28 02:44:08.435101: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcudnn.so.7'; dlerror: libcudnn.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64 2021-09-28 02:44:08.435114: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1641] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform. Skipping registering GPU devices... Setting up TensorFlow plugin "fused_bias_act.cu": Failed! 2021-09-28 02:44:08.919891: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcudart.so.10.0'; dlerror: libcudart.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64 2021-09-28 02:44:08.919973: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcublas.so.10.0'; dlerror: libcublas.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64 2021-09-28 02:44:08.920035: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcufft.so.10.0'; dlerror: libcufft.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64 2021-09-28 02:44:08.920095: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcurand.so.10.0'; dlerror: libcurand.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64 2021-09-28 02:44:08.920156: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcusolver.so.10.0'; dlerror: libcusolver.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64 2021-09-28 02:44:08.920215: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcusparse.so.10.0'; dlerror: libcusparse.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64 2021-09-28 02:44:08.920274: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcudnn.so.7'; dlerror: libcudnn.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64 2021-09-28 02:44:08.920282: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1641] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform. Skipping registering GPU devices... Traceback (most recent call last): File "/mnt/StyleCLIP-main/global_directions/GetCode.py", line 210, in GetCode(Gs,random_state,num_img,num_once,dataset_name) File "/mnt/StyleCLIP-main/global_directions/GetCode.py", line 82, in GetCode dlatent_avg=Gs.get_var('dlatent_avg') File "/mnt/StyleCLIP-main/global_directions/dnnlib/tflib/network.py", line 396, in get_var return self.find_var(var_or_local_name).eval() File "/mnt/StyleCLIP-main/global_directions/dnnlib/tflib/network.py", line 391, in find_var return self._get_vars()[var_or_local_name] if isinstance(var_or_local_name, str) else var_or_local_name File "/mnt/StyleCLIP-main/global_directions/dnnlib/tflib/network.py", line 297, in _get_vars self._vars = OrderedDict(self._get_own_vars()) File "/mnt/StyleCLIP-main/global_directions/dnnlib/tflib/network.py", line 286, in _get_own_vars self._init_graph() File "/mnt/StyleCLIP-main/global_directions/dnnlib/tflib/network.py", line 151, in _init_graph out_expr = self._build_func(*self._input_templates, *build_kwargs) File "", line 187, in G_main File "/mnt/StyleCLIP-main/global_directions/dnnlib/tflib/network.py", line 232, in input_shape return self.input_shapes[0] File "/mnt/StyleCLIP-main/global_directions/dnnlib/tflib/network.py", line 219, in input_shapes self._input_shapes = [t.shape.as_list() for t in self.input_templates] File "/mnt/StyleCLIP-main/global_directions/dnnlib/tflib/network.py", line 267, in input_templates self._init_graph() File "/mnt/StyleCLIP-main/global_directions/dnnlib/tflib/network.py", line 151, in _init_graph out_expr = self._build_func(self._input_templates, **build_kwargs) File "", line 491, in G_synthesis_stylegan2 File "", line 455, in layer File "", line 99, in modulated_conv2d_layer File "", line 68, in apply_bias_act File "/mnt/StyleCLIP-main/global_directions/dnnlib/tflib/ops/fused_bias_act.py", line 72, in fused_bias_act return impl_dict[impl](x=x, b=b, axis=axis, act=act, alpha=alpha, gain=gain, clamp=clamp) File "/mnt/StyleCLIP-main/global_directions/dnnlib/tflib/ops/fused_bias_act.py", line 132, in _fused_bias_act_cuda cuda_op = _get_plugin().fused_bias_act File "/mnt/StyleCLIP-main/global_directions/dnnlib/tflib/ops/fused_bias_act.py", line 18, in _get_plugin return custom_ops.get_plugin(os.path.splitext(file)[0] + '.cu') File "/mnt/StyleCLIP-main/global_directions/dnnlib/tflib/custom_ops.py", line 139, in get_plugin compile_opts += f' --gpu-architecture={_get_cuda_gpu_arch_string()}' File "/mnt/StyleCLIP-main/global_directions/dnnlib/tflib/custom_ops.py", line 60, in _get_cuda_gpu_arch_string raise RuntimeError('No GPU devices found') RuntimeError: No GPU devices found

kishanios123 commented 2 years ago

You need to have Nvidia Cuda compatible GPU to run this project.

BTW faced this issue with GPU also due to nvcc issue ... and solved it by installing cudatoolkit-dev==10.0 package with conda.