====== wheel包下载地址 ====== [[https://download.pytorch.org/whl/torch_stable.html|下载地址]] ====== 下载源码 ====== ''git clone --recursive https://github.com/pytorch/pytorch '' ====== 编译 ====== '' python setup.py install '' 如果需要限制CMAKE的cpu数量为2,使用''MAX_JOBS=2 python setup.py install''命令进行编译安装。\\ 若出现:''ptxas warning : Too big maxrregcount value specified 96, will be ignored''问题, 将/third_party/nccl/nccl/makefiles/common.mk第28行位置处sm_30的选项去掉: ... CUDA8_GENCODE = -gencode=arch=compute_30,code=sm_30 \ -gencode=arch=compute_35,code=sm_35 \ -gencode=arch=compute_50,code=sm_50 \ -gencode=arch=compute_60,code=sm_60 \ -gencode=arch=compute_61,code=sm_61 ... 修改为: ... CUDA8_GENCODE = -gencode=arch=compute_35,code=sm_35 \ -gencode=arch=compute_50,code=sm_50 \ -gencode=arch=compute_60,code=sm_60 \ -gencode=arch=compute_61,code=sm_61 ...