@TOC
the probability of this problem is that the CUDA version used for compilation is inconsistent with the CUDA version running
first check the CUDA version of the system (that is, the CUDA version used for compilation)
nvcc -V
In my pytorch + CONDA environment, you can use CONDA list to view the cudatoolkit version in the virtual environment. At first, the CUDA version of my system is 9.0 and the cudatoolkit version is 10.2. Therefore, the version is inconsistent, so the error message shown in the title appears. Later, I switched the CUDA version of the system and the problem was solved
brief description of the specific version switching method:
echo $path view CUDA path information, add the path of cuda10.2 and link it to/usr/local/CUDA. The specific instructions are
ln -s /usr/local/cuda10.2 /usr/local/cuda
Then modify the system path as follows:
vim ~/.bashrc
Add code at the end
export PATH=/usr/local/cuda:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
Press ESC, enter: WQ, press enter to exit, and then enter on the command line
source ~/.bashrc
Update path information
now enter from the command line
nvcc -V
You can view the CUDA version after switching
Read More:
- [Solved] NPM install Error: check python checking for Python executable python2 in the PATH
- Invalid python sd, Fatal Python error: init_fs_encoding: failed to get the Python cod [How to Solve]
- pytorch: RuntimeError CUDA error device-side assert triggered
- [Solved] PyTorch Error: TypeError: exceptions must derive from BaseException
- Pytorch directly creates a tensor on the GPU error [How to Solve]
- [Solved] Pytorch-geometric Error: No module named torch_sparse
- How to Solve Python WARNING: Ignoring invalid distribution -ip (e:\python\python_dowmload\lib\site-packages)
- Pytorch: error message with chunks of 0 [How to Solve]
- [Pytorch Error Solution] Pytorch distributed RuntimeError: Address already in use
- [pl.LightningModule] spaCy & pytorch-lightning Error
- Pytorch CUDA Error: UserWarning: CUDA initialization: CUDA unknown error…
- Pytorch Run Error: BrokenPipeError [How to Solve]
- Install PyTorch in Anaconda environment
- Pytorch: How to Handle error warning conda.gateways.disk.delete:unlink_or_rename_to_trash(140)
- [Solved] pytorch Error: KeyError: tensor(2, device=‘cuda:0‘)
- [Solved] PyTorch Lightning Error: KeyError: ‘hidden_states‘
- [Solved] RuntimeError : PyTorch was compiled without NumPy support
- pytorch model.load_state_dict Error [How to Solve]
- [Solved] pytorch loss.backward() Error: RuntimeError: Function AddBackward0 returned an invalid gradient at index 1…
- [Solved] Pytorch call tensorboard error: AttributeError: module ‘tensorflow’ has no attribute ‘gfile’