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/xzpdxz/article/details/134234579?ops_request_misc=%257B%2522request%255Fid%2522%253A%252299bbe4b1ac51cb04c82a39b5ff381481%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=99bbe4b1ac51cb04c82a39b5ff381481&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2blogfirst_rank_ecpm_v1~rank_v31_ecpm-8-134234579-null-null.nonecase&utm_term=cuda&spm=1018.2226.3001.4450

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  阅读(833)  评论(0)    收藏  举报