pytorch 源码编译安装

pytorch 源码编译安装

支持cuda, cudnn

1. 安装好GPU dirver, CUDA, cuDNN (注意对应版本)

2. 下载pytorch 源码

git clone https://github.com/pytorch/pytorch.git
cd pytorch
git pull 
git submodule sync
git submodule update --init --recursive

3. 编译

export DEBUG=1
python setup.py bdist_wheel

4. 安装编译的whl 包

pip install dist/torch*.whl

5. 卸载

pip uninstall torch
python setup.py clean

https://blog.csdn.net/CSDN_ten/article/details/132636688
https://findhao.net/academic/2590
https://blog.csdn.net/qq_36755743/article/details/136877045
https://codle.net/install-pytorch-from-source/
https://bbs.huaweicloud.com/blogs/407977

posted @ 2024-11-21 17:16  michaelchengjl  阅读(0)  评论(0编辑  收藏  举报