VScode版本
linux最新版本的vscode,可能无法进行python的调试
选择下载1.85 https://code.visualstudio.com/updates/v1_85
CUDA版本
https://developer.nvidia.com/Cuda-Toolkit-archive
由于受限于TRT的8.6(下面会说明),所以CUDA Version最高为: 12.1,而pytorch的限制只能是12.1或者是11.8。
重装cuda toolkit后,须重装pytorch
Pytorch版本
https://pytorch.org/get-started/locally/
选择12.1
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
TensorRT版本
https://developer.nvidia.com/tensorrt/download
受限于CentOS7版本,trt最高为8.6。
安装后的提示,配置路径与卸载命令:
Please make sure that
- PATH includes /usr/local/cuda-12.0/bin
- LD_LIBRARY_PATH includes /usr/local/cuda-12.0/lib64, or, add /usr/local/cuda-12.0/lib64 to /etc/ld.so.conf and run ldconfig as root
To uninstall the CUDA Toolkit, run cuda-uninstaller in /usr/local/cuda-12.0/bin
To uninstall the NVIDIA Driver, run nvidia-uninstall
报错
nn.Conv1d运算报错
在pytorch中使用 nn.Conv1d 算子,会报错:
[1] 17446 segmentation fault python test.py
这个网上无法搜到的问题,就是版本不匹配导致的问题,重装一遍cuda与pytorch。</