Issue: torch.cuda.is_available() returns False
·
Cuda Info:
Run nvidia-smi:

Problem: It turned out that using conda will install a CPU-only version by running the conda command provided by https://pytorch.org/get-started/locally/
Solution: Use the pip command to install the torch. In my case it should be
pip3 install torch==1.10.0+cu113 torchvision==0.11.1+cu113 torchaudio===0.10.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
After the installation, check whether the gpu-based torch has been installed:

Reference: 解决torch.cuda.is_available()一直返回False的玄学方法之一_dysljxjsq的博客-CSDN博客
欢迎来到FlagOS开发社区,这里是一个汇聚了AI开发者、数据科学家、机器学习爱好者以及业界专家的活力平台。我们致力于成为业内领先的Triton技术交流与应用分享的殿堂,为推动人工智能技术的普及与深化应用贡献力量。
更多推荐



所有评论(0)