As Chinese input app doesn’t installed in my computer, so I write this passage in English.
Some logs encountered related to the incompatibility between torch and CUDA :
/home/supercomputer/Downloads/Dr.VOT/.venv/lib/python3.7/site-packages/torch/cuda/__init__.py:125: UserWarning:
NVIDIA GeForce RTX 3090 with CUDA capability sm_86 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_70 sm_75.
If you want to use the NVIDIA GeForce RTX 3090 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/
Log2:
RuntimeError: CUDA error: no kernel image is available for execution on the device
Environment settings:
- The model environment is pipenv
- python: 3.7
- cuda 11.6
- ubuntu 20.4
- GPU: RTX 3090
Reason:
the cuda version is lower than torch version. So we need to upgrade cuda version.
I tried many times to upgrade torch version. from 1.2.0 to 1.8.0. Unfortunately, I cannot works.
Solutions:
I found that the pipenv uses the cuda in python.
so I install python in ubuntu and the cudatookit in python.
1: install python in ubuntu
sudo apt install python3.7
2: pip install torch
pip install torch==1.8.0+cu111 torchvision==0.9.0+cu111 torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html
then it works
inspiration:
nvidia-smi : cuda version: 11.6
print(torch.version.cuda) : cuda version: 10.2
so, install cudatoolkit: print(torch.version.cuda) : cuda version: 11.1
Then it works.
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)