在尝试训练StyleGAN2的时候报错:
nvcc "D:\Anaconda3\lib\site-packages\tensorflow\python\_pywrap_tensorflow_internal.lib" --gpu-architecture=sm_75 --use_fast_math --disable-warnings --include-path "D:\Anaconda3\lib\site-packages\tensorflow\include" --include-path "D:\Anaconda3\lib\site-packages\tensorflow\include\external\protobuf_archive\src" --include-path "D:\Anaconda3\lib\site-packages\tensorflow\include\external\com_google_absl" --include-path "D:\Anaconda3\lib\site-packages\tensorflow\include\external\eigen_archive" --compiler-bindir "D:/vs2017/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64" 2>&1 "D:\tencent\date\823239962\FileRecv\stylegan2encoder\stylegan2encoder\dnnlib\tflib\ops\fused_bias_act.cu" --shared -o "C:\Users\18929\AppData\Local\Temp\tmp_cbjdgdx\fused_bias_act_tmp.dll" --keep --keep-dir "C:\Users\18929\AppData\Local\Temp\tmp_cbjdgdx"
_pywrap_tensorflow_internal.lib
fused_bias_act.cu
nvcc error : 'cudafe++' died with status 0xC0000005 (ACCESS_VIOLATION)
三种解决方法
- 将CUDA升级为10.1
✖ StyleGAN要依赖CUDA10.0 - 手动修补CUDA10.0
下载并安装CUDA 10.1 update 1,但只安装NVCC。
将C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\cudafe++.exe
替换到C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin\cudafe++.exe
… - 在尝试进行
2
的时候,我发现C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA
文件夹下同时有v10.0
和v10.1
文件夹,应该是之前安装错了没清理掉.删除v10.1
文件夹即可.