a312863063 / generators-with-stylegan2

Here is a series of face generators based on StyleGAN2
Other
2.41k stars 553 forks source link

请问如果有多张gpu卡,怎么让它们一起跑呢 #16

Open fatalice opened 4 years ago

fatalice commented 4 years ago

请问如果有多张gpu卡,怎么让它们一起跑呢

OliviaDdy commented 4 years ago

我使用的是docker镜像,在运行程序的时候,报出以下错误, Loading networks from "networks/generator_baby-stylegan2-config-f.pkl"... 2020-07-21 10:35:33.079771: E tensorflow/stream_executor/cuda/cuda_driver.cc:318] failed call to cuInit: UNKNOWN ERROR (-1) Setting up TensorFlow plugin "fused_bias_act.cu": Preprocessing... Failed! Traceback (most recent call last): File "main_child.py", line 58, in main() File "main_child.py", line 54, in main generate_images(network_pkl, generate_num) File "main_child.py", line 19, in generate_images _G, _D, Gs = pretrained_networks.load_networks(network_pkl) File "/home/XX/code/self/deep_bone/Code-GAN/generators-with-stylegan2/pretrained_networks.py", line 76, in load_networks G, D, Gs = pickle.load(stream, encoding='latin1')

File "", line 68, in apply_bias_act File "/home/XX/code/self/deep_bone/Code-GAN/generators-with-stylegan2/dnnlib/tflib/ops/fused_bias_act.py", line 68, in fused_bias_act return impl_dict[impl](x=x, b=b, axis=axis, act=act, alpha=alpha, gain=gain) File "/home/XX/code/self/deep_bone/Code-GAN/generators-with-stylegan2/dnnlib/tflib/ops/fused_bias_act.py", line 122, in _fused_bias_act_cuda cuda_kernel = _get_plugin().fused_bias_act File "/home/XX/code/self/deep_bone/Code-GAN/generators-with-stylegan2/dnnlib/tflib/ops/fused_bias_act.py", line 16, in _get_plugin return custom_ops.get_plugin(os.path.splitext(file)[0] + '.cu') File "/home/XX/code/self/deep_bone/Code-GAN/generators-with-stylegan2/dnnlib/tflib/custom_ops.py", line 130, in get_plugin compile_opts += ' --gpu-architecture=%s' % _get_cuda_gpu_arch_string() File "/home/XX/code/self/deep_bone/Code-GAN/generators-with-stylegan2/dnnlib/tflib/custom_ops.py", line 52, in _get_cuda_gpu_arch_string raise RuntimeError('No GPU devices found') RuntimeError: No GPU devices found

主要是没有GPU,我想问一下,这个的解决思路是什么样的?

YangWenfeng-cn commented 1 year ago

请问如果有多张gpu卡,怎么让它们一起跑呢 您找到多卡运行的方法了吗?求教!