compiler-errors - 从源代码编译 PyTorch 1.10.0
问题描述
我一直在尝试从源代码安装新版本的 PyTorch (1.10.0)。我已按照PyTorch 团队的指示进行操作。
工具/库/操作系统版本:gcc 8.3、Python 3.7.6(推荐)、Cuda 11.0、PyTorch 1.10.0、Linux RedHat
关于 gcc 的版本,我知道其他人使用 8.3 版本并安装 PyTorch 1.9.0 是成功的。
整个脚本如下:
conda install -c anaconda cudatoolkit
conda install astunparse numpy ninja pyyaml mkl mkl-include setuptools cmake cffi typing_extensions future six requests dataclasses
conda install -c pytorch magma-cuda110
module load gcc/8.3 #version of gcc
git clone --recursive https://github.com/pytorch/pytorch
cd pytorch
git checkout v1.10.0
USE_CUDA=1
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
git submodule update --recursive
python setup.py install
conda install -c conda-forge freetype jpeg lcms2 libmklml libpng libtiff libwebp-base olefile openjpeg pillow typing-extensions ffmpeg
git clone --recursive https://github.com/pytorch/vision
cd vision
python setup.py install
一些警告引起了我的注意:
CMake Warning at caffe2/CMakeLists.txt:1748 (add_executable):
Cannot generate a safe runtime search path for target backend_fallback_test
because there is a cycle in the constraint graph:
dir 0 is [.../miniconda3/envs/pyts/lib]
dir 2 must precede it due to runtime library [libcudart.so.11.0]
dir 1 is [.../pytorch/build/lib]
dir 2 is [/usr/local/cuda/lib64]
dir 0 must precede it due to runtime library [libnvToolsExt.so.1]
Some of these libraries may not be found correctly.
经过几次尝试,错误是这样的:
[6432/6692] Building CXX object caffe2....dir/csrc/jit/python/script_init.cpp.o
ninja: build stopped: subcommand failed.
有什么提示吗?谢谢你。
解决方案
推荐阅读
- php - 我如何在 Auth::attempts Laravel 中弄错
- java - 如果项目匹配条件,有没有办法退出 java 流?
- android - 在运行时为 Analytics logEvents 初始化 Firebase 不起作用
- html - 不需要时修改引导容器边距
- woocommerce - _billing_address 值自动填充 _billing_address_2 具有相同的值
- python - 为什么我的 PID 控制器无法通过图像处理跟踪对象?
- windows - 如何让 Windows 上的 Git Bash“编辑器”做任何事情?
- hash - 为什么交易哈希比特币数百万价值 txid
- c++ - 如何在 C++ 中调用使用部分模板参数包的函数?
- reactjs - reactjs中componentName.test.js文件的用途是什么