pytorch源代码编译
相信很多朋友们安装pytorch时都是使用conda或者pip直接进行安装,但是如果想要了解pytorch底层的CPP实现或者修改底层C++的代码就需要拉取pytorch官方仓库进行源代码编译
所以下面我来介绍下如何从源代码编译pytorch以及相关的踩坑记录
pytorch源码编译
环境版本
cuda 10.0 pytorch1.4 python3.6
编译步骤
conda create -n name python=3.6#创建conda环境
#conda remove -n py39 --all#删除
conda install numpy ninja pyyaml mkl mkl-include setuptools cmake cffi typing#安装依赖库
conda install -c pytorch magma-cuda100#安装对应cuda依赖
git clone --branch release/1.4 https://g