python-linux,windowns环境下报错,解决思路
哇,出现了这一堆错误:
Setting up PyTorch plugin "bias_act_plugin"... Failed!
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
ninja: build stopped: subcommand failed.
具体错误如下
Setting up PyTorch plugin "bias_act_plugin"... Failed! Traceback (most recent call last): File "/home/yhx/anaconda3/envs/eg3D/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1740, in _run_ninja_build subprocess.run( File "/home/yhx/anaconda3/envs/eg3D/lib/python3.9/subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/yhx/PycharmProjects/eg3d/eg3d/eg3d/viz/renderer.py", line 143, in render self._render_impl(res, **args) File "/home/yhx/PycharmProjects/eg3d/eg3d/eg3d/viz/renderer.py", line 324, in _render_impl all_ws = G.mapping(z=all_zs, c=all_cs, truncation_psi=trunc_psi, truncation_cutoff=trunc_cutoff) - w_avg File "<string>", line 41, in mapping File "/home/yhx/anaconda3/envs/eg3D/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "<string>", line 246, in forward File "/home/yhx/anaconda3/envs/eg3D/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "<string>", line 124, in forward File "/home/yhx/PycharmProjects/eg3d/eg3d/eg3d/torch_utils/ops/bias_act.py", line 86, in bias_act if impl == 'cuda' and x.device<

文章讲述了在开发过程中遇到的PyTorch插件编译错误,主要原因是虚拟环境中的CUDA版本(11.1)与本地系统(12.2)冲突,以及GCC版本不匹配。解决方案包括在本地安装对应版本的CUDA(11.1),并调整.bashrc文件以正确配置环境,以及可能时升级GCC到10.x版本以匹配CUDA需求。

2039

被折叠的 条评论
为什么被折叠?



