The method used in this paper
The versions of pytorch, cudatoolkit and CUDA driver should be consistent
Problem description
When training the stylegan3 model with multi GPU:
python train.py --outdir=training-runs --cfg=stylegan3-r \
--data=datastes/your_data.zip \
--cfg=stylegan3-r --gpus=4 --batch=32 --gamma=8 --kimg=1800 --snap=50 --tick=2
Error Messages:
torch.multiprocessing.spawn.ProcessRaisedException:
……
RuntimeError: NCCL error in: /opt/conda/conda-bld/pytorch_1631630841592/work/torch/lib/c10d/ProcessGroupNCCL.cpp:911, unhandled cuda error, NCCL version 2.7.8
ncclUnhandledCudaError: Call to CUDA function failed.
Local Environment
4xTeslaV100 graphics card drivers and CUDA version 11.0
stylegan3 Default Environment
Solution:
Go to the pytorch official website and search the corresponding version of Cudatookit
conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=11.0 -c pytorch
Tried Method:
Method 1: install nccl (this article is useless)
Method 2: the versions of pytorch, CUDA toolkit and CUDA driver are the same
https://github.com/ultralytics/yolov5/issues/4530
Read More:
- unhandled system error, NCCL version 2.7.8 [How to Solve]
- [Solved] CUDA error:-UserWarning: CUDA initialization: CUDA unknown error
- Pytorch error: `module ‘torch‘ has no attribute ‘__version___‘`
- [Solved] torch Do Targer Detection Error: RuntimeError: CUDA error: device-side assert triggered
- [Solved] UserWarning: CUDA initialization: CUDA unknown error
- [Solved] Pytorch3d Error: RuntimeError: Not compiled with GPU support.
- Cuda Runtime error (38) : no CUDA-capable device is detected
- [Solved] pytorch CrossEntropyLoss Error: RuntimeError: 1D target tensor expected, multi-target not supported
- [Solved] Error: package or namespace load failed for ‘ggplot2’ in loadNamespace(i, c(lib.loc, .libPaths()), v
- Clickhouse error: XXXX.XXXX_local20211009 (8fdb18e9-bb4c-42d8-8fdb-18e9bb4c02d8): auto…
- Error 1 error MSB3721: Command ““C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin\nvcc.exe” -genco
- How to Solve error: command ‘C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\bin\nvcc.exe‘ failed
- [Solved] configure: error: C++ preprocessor “/lib/cpp” fails sanity check
- TensorFlow-gpu Error: failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
- [Solved] Pytorch loading model specified GPU card number error or failed to specify
- Pytorch failed to specify GPU resolution
- Tensorflow C++:You must define TF_LIB_GTL_ALIGNED_CHAR_ARRAY for your compiler
- [Solved] matlab Error: CUDA_ERROR_SYSTEM_NOT_READY
- [Solved] Open3d error: unable to display image using open3d
- [Solved] CUDA fails to compile in visual studio and throws error msb3721 and nvcc fatal