这似乎是 CUDA 库的问题pytorch 2.0.x+cu118
。有几个可能的修复方法
1.降级到以前的 CUDA 库 cu117。例如:
pip3 uninstall pytorch
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117)
2.要继续使用 cu118,请在 torch 包库中创建符号链接。
cd venv/python3.10/site-packages/torch/lib # (or the path to dist-packages/torch/lib, depending on how you installed pytorch)
ln -s libnvrtc-*.so.11.2 libnvrtc.so
或者,您应该能够忽略该警告;它理应不会有任何副作用或影响。
st上找的回答,我把pytorch cuda11.8 版本降低了等级就好了。