为IBM PLX构建libtorch

时间:2019-08-14 16:27:58

标签: libtorch

似乎不直接支持IBM PLX计算机,也没有为它们生成的二进制文件。我正在尝试为IBM PLX计算机构建libtorch。我克隆了源代码并开始了构建过程。但是,我在第一点出现了一个错误:

python tools/build_libtorch.py
cmake -DBUILD_PYTHON=False -DBUILD_TEST=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=  -DCMAKE_C_FLAGS=  -DCMAKE_EXE_LINKER_FLAGS= -DCMAKE_INSTALL_PREFIX=/bigdisk/plx/pytorch/torch -DCMAKE_PREFIX_PATH=/usr/lib/python2.7/site-packages -DCMAKE_SHARED_LINKER_FLAGS= -DINSTALL_TEST=(True,) -DNUMPY_INCLUDE_DIR=/usr/lib64/python2.7/site-packages/numpy/core/include -DPYTHON_EXECUTABLE=/bin/python -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DUSE_CUDA=True -DUSE_DISTRIBUTED=True -DUSE_NUMPY=True -DUSE_SYSTEM_EIGEN_INSTALL=OFF /bigdisk/plx/pytorch
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  CMake 3.5 or higher is required.  You are running version 2.8.12.2


-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
  File "tools/build_libtorch.py", line 23, in <module>
    rerun_cmake=True, cmake_only=False, cmake=CMake())
  File "/bigdisk/plx/pytorch/tools/build_pytorch_libs.py", line 61, in build_caffe2
    rerun_cmake)
  File "/bigdisk/plx/pytorch/tools/setup_helpers/cmake.py", line 313, in generate
    self.run(args, env=my_env)
  File "/bigdisk/plx/pytorch/tools/setup_helpers/cmake.py", line 133, in run
    check_call(command, cwd=self.build_dir, env=env)
  File "/usr/lib64/python2.7/subprocess.py", line 542, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '-DBUILD_PYTHON=False', '-DBUILD_TEST=True', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_CXX_FLAGS= ', '-DCMAKE_C_FLAGS= ', '-DCMAKE_EXE_LINKER_FLAGS=', '-DCMAKE_INSTALL_PREFIX=/bigdisk/plx/pytorch/torch', '-DCMAKE_PREFIX_PATH=/usr/lib/python2.7/site-packages', '-DCMAKE_SHARED_LINKER_FLAGS=', '-DINSTALL_TEST=(True,)', '-DNUMPY_INCLUDE_DIR=/usr/lib64/python2.7/site-packages/numpy/core/include', '-DPYTHON_EXECUTABLE=/bin/python', '-DPYTHON_INCLUDE_DIR=/usr/include/python2.7', '-DUSE_CUDA=True', '-DUSE_DISTRIBUTED=True', '-DUSE_NUMPY=True', '-DUSE_SYSTEM_EIGEN_INSTALL=OFF', '/bigdisk/plx/pytorch']' returned non-zero exit status 1

如果我忽略此步骤并直接调用build,则会得到:

python setup.py build
Building wheel torch-1.2.0a0+40f0b1c
-- Building version 1.2.0a0+40f0b1c
cmake --build . --target install --config Release -- -j 160
Error: could find generator in Cache
Traceback (most recent call last):
  File "setup.py", line 756, in <module>
    build_deps()
  File "setup.py", line 321, in build_deps
    cmake=cmake)
  File "/bigdisk/plx/pytorch/tools/build_pytorch_libs.py", line 64, in build_caffe2
    cmake.build(my_env)
  File "/bigdisk/plx/pytorch/tools/setup_helpers/cmake.py", line 329, in build
    self.run(build_args, my_env)
  File "/bigdisk/plx/pytorch/tools/setup_helpers/cmake.py", line 133, in run
    check_call(command, cwd=self.build_dir, env=env)
  File "/usr/lib64/python2.7/subprocess.py", line 542, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '160']' returned non-zero exit status 1

感谢您的帮助或评论。

0 个答案:

没有答案