英文:
Pytorch 2.0.1+cu118 is not working with Cuda 12.1
问题
我在我的计算机上安装了CUDA 12.1,以及PyTorch 2.0.1+cu118。
我正尝试安装CLIP-FIELDS。当我运行gridencoder的"python setup.py install"时,出现以下错误:
检测到的CUDA版本(12.1)与用于编译PyTorch的版本(11.8)不匹配。请确保使用相同的CUDA版本。
我在官方PyTorch论坛上看到了关于此问题的讨论:https://discuss.pytorch.org/t/install-pytorch-with-cuda-12-1/174294,其中提到cuda 12.1与Torch 2.0.1+cu118兼容。
有人知道导致崩溃的原因吗?
英文:
I have CUDA 12.1 installed on my computer, and Pytorch 2.0.1+cu118 installed.
I am trying to the installation of CLIP-FIELDS. When I install gridencoder "python setup.py install", it appears the following error:
The detected CUDA version (12.1) mismatches the version that was used to compile
PyTorch (11.8). Please make sure to use the same CUDA versions.
I saw on official pytorch forums <https://discuss.pytorch.org/t/install-pytorch-with-cuda-12-1/174294> that cuda 12.1 is compatible with Torch 2.0.1+cu118.
Does anyone know the reason of crashing then?
答案1
得分: 2
匹配CUDA和Pytorch的版本通常很麻烦。
我看到2个解决方案:
- 本地安装CUDA 11.8。这可能会很麻烦,而且可能会破坏其他Python安装,最坏的情况下还可能破坏计算机的图形可视化。
- 创建一个具有正确版本的Pytorch和CUDA的Docker容器。第一次学习可能会有点麻烦,但之后可以用于任何后续的Git存储库安装。并且没有危害主要计算机的主要CUDA的风险。
英文:
To match the version of CUDA and Pytorch is usually a pain in the mass.
I see 2 solutions :
- Install CUDA 11.8 natively. This can be painful and break other python installs, and in the worst case also the graphical visualization in the computer
- Create a Docker Container with the proper version of pytorch and CUDA. This can be painful to learn the first time, but then is a skill that can be used for any later install of a git repository. And there is no risk to compromise the main CUDA of the computer.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论