【安装错误】Paddle源码编译时设置-DWITH_XBYAK=OFF,安装后import出错
Created by: zhangting2020
问题描述
docker编译:镜像 hub.baidubce.com/paddlepaddle/paddle:latest-gpu-cuda9.0-cudnn7-dev
- 使用最新的develop分支代码,源码编译,设置-DWITH_XBYAK=OFF,例如:
cmake .. -DPY_VERSION=2.7 -DWITH_GPU=ON -DWITH_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DWITH_XBYAK=OFF
- 编译完成后安装,import 出错,如下:
λ paddle-gpu /workspace/Paddle/build {develop} python
Python 2.7.12 (default, Nov 12 2018, 14:36:49)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import paddle.fluid as fluid
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
F0217 05:33:03.666159 22983 init.cc:195] This version is compiled on higher instruction(AVX) system, you may encounter illegal instruction error running on your local CPU machine. Please reinstall the NonAVX version or compile from source code.
*** Check failure stack trace: ***
@ 0x7fe444bf525d google::LogMessage::Fail()
@ 0x7fe444bf75a8 google::LogMessage::SendToLog()
@ 0x7fe444bf4d6b google::LogMessage::Flush()
@ 0x7fe444bf847e google::LogMessageFatal::~LogMessageFatal()
@ 0x7fe444d17a6d paddle::framework::InitDevices()
@ 0x7fe444d17b7c paddle::framework::InitDevices()
@ 0x7fe4448a69f2 _ZZN8pybind1112cpp_function10initializeIZN6paddle6pybindL22pybind11_init_core_avxERNS_6moduleEEUlbE107_vJbEJNS_4nameENS_5scopeENS_7siblingEEEEvOT_PFT0_DpT1_EDpRKT2_ENUlRNS_6detail13function_callEE1_4_FUNESN_
@ 0x7fe4449322f1 pybind11::cpp_function::dispatcher()
@ 0x4bc4aa PyEval_EvalFrameEx
@ 0x4b9b66 PyEval_EvalCodeEx
@ 0x4c1f56 PyEval_EvalFrameEx
@ 0x4b9b66 PyEval_EvalCodeEx
@ 0x4b9856 PyEval_EvalCode
@ 0x4b978f PyImport_ExecCodeModuleEx
@ 0x4b2bc6 (unknown)
@ 0x4b40ec (unknown)
@ 0x4a4be1 (unknown)
@ 0x4a4667 PyImport_ImportModuleLevel
@ 0x4a5ae4 (unknown)
@ 0x4a587e PyObject_Call
@ 0x4c5ef0 PyEval_CallObjectWithKeywords
@ 0x4bec4b PyEval_EvalFrameEx
@ 0x4b9b66 PyEval_EvalCodeEx
@ 0x4eb69f (unknown)
@ 0x44a7c2 PyRun_InteractiveOneFlags
@ 0x44a58d PyRun_InteractiveLoopFlags
@ 0x430b76 (unknown)
@ 0x4938ce Py_Main
@ 0x7fe499ef9830 __libc_start_main
@ 0x493299 _start
@ (nil) (unknown)
Aborted (core dumped)
- 其他:
- 在GPU物理机和CPU物理机上都测试过,编译时设置-DWITH_XBYAK=OFF时会出现上述错误
- 但同时设置-DWITH_XBYAK=OFF以及-DWITH_AVX=OFF,则正常