为使您的问题得到快速解决,在建立Issue前,请您先通过如下方式搜索是否有相似问题:【搜索issue关键字】【使用labels筛选】【官方文档】
建立issue时,为快速解决问题,请您根据使用情况给出如下信息:
- 标题:请包含关键词“安装错误”/“编译错误”,例如“Mac编译错误”
- 版本、环境信息:
1)PaddlePaddle版本:2.0.0r1
2)CPU:Kunpeng 920
3)系统环境:请麒麟v10/
- python3.6.9
- 安装方式信息:
1)源码编译
目前已经成功完成编译,已经成功完成安装,但是在验证安装的时候报错了
python3
import paddle
报错
[root@localhost dist]# python3
Python 3.6.9 (default, May 8 2021, 15:46:09)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import paddle
Error: Can not import noavx core while this file exists /usr/local/python3/lib/python3.6/site-packages/paddle/fluid/core_noavx.so
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/python3/lib/python3.6/site-packages/paddle/init.py", line 34, in
from .fluid import monkey_patch_variable
File "/usr/local/python3/lib/python3.6/site-packages/paddle/fluid/init.py", line 35, in
from . import framework
File "/usr/local/python3/lib/python3.6/site-packages/paddle/fluid/framework.py", line 35, in
from . import core
File "/usr/local/python3/lib/python3.6/site-packages/paddle/fluid/core.py", line 333, in
raise e
File "/usr/local/python3/lib/python3.6/site-packages/paddle/fluid/core.py", line 299, in
from .core_noavx import *
ImportError: /usr/local/python3/lib/python3.6/site-packages/paddle/fluid/core_noavx.so: undefined symbol: PyThread_tss_create
7条答案
按热度按时间i7uq4tfw1#
您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看 官网API文档 、 常见问题 、 历史Issue 、 AI社区 来寻求解答。祝您生活愉快~
Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the API , FAQ , Github Issue and AI community to get the answer.Have a nice day!
q3aa05252#
@iclementine 您好,请问这个问题是我哪里弄得不对吗?
wgxvkvu93#
您好,我怀疑是cmake编译的时候指定的python(获其依赖库)与您使用的python不一致。
能否检查下cmake的输出log,看下其使用的Python路径等信息
fdx2calv4#
@jiweibo 你好有没有可能是 官网的cmake 命令有问题 里面的 gpu 是自动开启的 我是cpu 需要给他关着 我真在尝试是不是这个问题 , python 路径是对的
t98cgbkg5#
@jiweibo 不行我把 cmake 里面的gpu 关了还是不行
cmake .. -DPY_VERSION=3 -DPYTHON_EXECUTABLE=
which python3
-DWITH_ARM=ON -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DON_INFER=ON -DWITH_XBYAK=OFF -DWITH_GPU=OFF -DWITH_AVX=OFFpython 路径也是一样的
那台电脑不行我又重新找了一台电脑基本的环境都是一样的 但是在
第九步编译的时候
make TARGET=ARMV8 -j$(nproc)
出现一个问题 不能成功编译
请问这个是什么影响的,试了好久了
[ 11%] Building CXX object paddle/fluid/operators/detection/CMakeFiles/mask_util.dir/mask_util.cc.o
In file included from /root/Paddle/paddle/fluid/operators/math/blas.h:428:0,
from /root/Paddle/paddle/fluid/operators/math/blas.cc:15:
/root/Paddle/paddle/fluid/operators/math/blas_impl.h:623:26: 错误:‘CBLAS_LAYOUT’ does not name a type; did you mean ‘CBLAS_UPLO’?
static void GEMV(const CBLAS_LAYOUT layout, const CBLAS_TRANSPOSE TransA,
^~~~~~~~~~~~
CBLAS_UPLO
[ 11%] Building CXX object paddle/fluid/framework/CMakeFiles/garbage_collector.dir/garbage_collector.cc.o
/root/Paddle/paddle/fluid/operators/math/blas_impl.h:634:26: 错误:‘CBLAS_LAYOUT’ does not name a type; did you mean ‘CBLAS_UPLO’?
static void GEMM(const CBLAS_LAYOUT layout, const CBLAS_TRANSPOSE TransA,
^~~~~~~~~~~~
CBLAS_UPLO
/root/Paddle/paddle/fluid/operators/math/blas_impl.h:661:26: 错误:‘CBLAS_LAYOUT’ does not name a type; did you mean ‘CBLAS_UPLO’?
static void GEMV(const CBLAS_LAYOUT layout, const CBLAS_TRANSPOSE TransA,
^~~~~~~~~~~~
CBLAS_UPLO
/root/Paddle/paddle/fluid/operators/math/blas_impl.h:672:26: 错误:‘CBLAS_LAYOUT’ does not name a type; did you mean ‘CBLAS_UPLO’?
static void GEMM(const CBLAS_LAYOUT layout, const CBLAS_TRANSPOSE TransA,
^~~~~~~~~~~~
CBLAS_UPLO
In file included from /root/Paddle/paddle/fluid/operators/math/blas.h:428:0,
from /root/Paddle/paddle/fluid/operators/math/matrix_bit_code.h:24,
from /root/Paddle/paddle/fluid/operators/math/matrix_bit_code.cc:15:
/root/Paddle/paddle/fluid/operators/math/blas_impl.h:623:26: 错误:‘CBLAS_LAYOUT’ does not name a type; did you mean ‘CBLAS_UPLO’?
static void GEMV(const CBLAS_LAYOUT layout, const CBLAS_TRANSPOSE TransA,
^~~~~~~~~~~~
CBLAS_UPLO
/root/Paddle/paddle/fluid/operators/math/blas_impl.h:634:26: 错误:‘CBLAS_LAYOUT’ does not name a type; did you mean ‘CBLAS_UPLO’?
static void GEMM(const CBLAS_LAYOUT layout, const CBLAS_TRANSPOSE TransA,
^~~~~~~~~~~~
CBLAS_UPLO
/root/Paddle/paddle/fluid/operators/math/blas_impl.h:661:26: 错误:‘CBLAS_LAYOUT’ does not name a type; did you mean ‘CBLAS_UPLO’?
static void GEMV(const CBLAS_LAYOUT layout, const CBLAS_TRANSPOSE TransA,
^~~~~~~~~~~~
CBLAS_UPLO
/root/Paddle/paddle/fluid/operators/math/blas_impl.h:672:26: 错误:‘CBLAS_LAYOUT’ does not name a type; did you mean ‘CBLAS_UPLO’?
static void GEMM(const CBLAS_LAYOUT layout, const CBLAS_TRANSPOSE TransA,
^~~~~~~~~~~~
CBLAS_UPLO
In file included from /root/Paddle/paddle/fluid/operators/math/blas.h:428:0,
from /root/Paddle/paddle/fluid/operators/math/matrix_inverse.cc:18:
/root/Paddle/paddle/fluid/operators/math/blas_impl.h:623:26: 错误:‘CBLAS_LAYOUT’ does not name a type; did you mean ‘CBLAS_UPLO’?
static void GEMV(const CBLAS_LAYOUT layout, const CBLAS_TRANSPOSE TransA,
^~~~~~~~~~~~
CBLAS_UPLO
[ 11%] Linking CXX static library libsequence_scale.a
/root/Paddle/paddle/fluid/operators/math/blas_impl.h:634:26: 错误:‘CBLAS_LAYOUT’ does not name a type; did you mean ‘CBLAS_UPLO’?
static void GEMM(const CBLAS_LAYOUT layout, const CBLAS_TRANSPOSE TransA,
^~~~~~~~~~~~
CBLAS_UPLO
[ 11%] Built target sequence_scale
/root/Paddle/paddle/fluid/operators/math/blas_impl.h:661:26: 错误:‘CBLAS_LAYOUT’ does not name a type; did you mean ‘CBLAS_UPLO’?
static void GEMV(const CBLAS_LAYOUT layout, const CBLAS_TRANSPOSE TransA,
^~~~~~~~~~~~
CBLAS_UPLO
/root/Paddle/paddle/fluid/operators/math/blas_impl.h:672:26: 错误:‘CBLAS_LAYOUT’ does not name a type; did you mean ‘CBLAS_UPLO’?
static void GEMM(const CBLAS_LAYOUT layout, const CBLAS_TRANSPOSE TransA,
^~~~~~~~~~~~
CBLAS_UPLO
In file included from /root/Paddle/paddle/fluid/operators/math/blas.h:428:0,
from /root/Paddle/paddle/fluid/operators/activation_op.h:29,
from /root/Paddle/paddle/fluid/operators/math/detail/lstm_cpu_kernel.h:18,
from /root/Paddle/paddle/fluid/operators/math/lstm_compute.cc:17:
/root/Paddle/paddle/fluid/operators/math/blas_impl.h:623:26: 错误:‘CBLAS_LAYOUT’ does not name a type; did you mean ‘CBLAS_UPLO’?
static void GEMV(const CBLAS_LAYOUT layout, const CBLAS_TRANSPOSE TransA,
^~~~~~~~~~~~
CBLAS_UPLO
/root/Paddle/paddle/fluid/operators/math/blas_impl.h:634:26: 错误:‘CBLAS_LAYOUT’ does not name a type; did you mean ‘CBLAS_UPLO’?
static void GEMM(const CBLAS_LAYOUT layout, const CBLAS_TRANSPOSE TransA,
^~~~~~~~~~~~
CBLAS_UPLO
/root/Paddle/paddle/fluid/operators/math/blas_impl.h:661:26: 错误:‘CBLAS_LAYOUT’ does not name a type; did you mean ‘CBLAS_UPLO’?
static void GEMV(const CBLAS_LAYOUT layout, const CBLAS_TRANSPOSE TransA,
^~~~~~~~~~~~
CBLAS_UPLO
/root/Paddle/paddle/fluid/operators/math/blas_impl.h:672:26: 错误:‘CBLAS_LAYOUT’ does not name a type; did you mean ‘CBLAS_UPLO’?
static void GEMM(const CBLAS_LAYOUT layout, const CBLAS_TRANSPOSE TransA,
^~~~~~~~~~~~
CBLAS_UPLO
make[2]: *** [paddle/fluid/operators/math/CMakeFiles/blas.dir/build.make:66:paddle/fluid/operators/math/CMakeFiles/blas.dir/blas.cc.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:56733:paddle/fluid/operators/math/CMakeFiles/blas.dir/all] 错误 2
make[1]: *** 正在等待未完成的任务....
In file included from /root/Paddle/paddle/fluid/operators/math/sample_prob.cc:15:0:
/root/Paddle/paddle/fluid/operators/math/sample_prob.h: 在成员函数‘void paddle::operators::math::SampleWithProb<DeviceContext, T>::operator()(const DeviceContext&, const paddle::operators::math::Sampler&, std::size_t, const Tensor*, paddle::operators::math::Tensor*, paddle::operators::math::Tensor*) [with DeviceContext = paddle::platform::CPUDeviceContext; T = float]’中:
/root/Paddle/paddle/fluid/operators/math/sample_prob.h:58:46: 警告:此函数中的‘((void)& lbl_dim +8)’在使用前可能未初始化 [-Wmaybe-uninitialized]
const int num_sampled_classes = num_true + num_samples;
~~~~~~~~~^~~~~~~~~~~~~
/root/Paddle/paddle/fluid/operators/math/sample_prob.h:56:15: 警告:此函数中的‘lbl_dim’在使用前可能未初始化 [-Wmaybe-uninitialized]
const int batch_size = lbl_dim[0];
^~~~~~~~~~
[ 11%] Linking CXX static library libop_kernel_type.a
[ 11%] Built target op_kernel_type
[ 11%] Linking CXX static library libdata_type.a
[ 11%] Built target data_type
/root/Paddle/paddle/fluid/operators/math/sample_prob.h: 在成员函数‘void paddle::operators::math::SampleWithProb<DeviceContext, T>::operator()(const DeviceContext&, const paddle::operators::math::Sampler&, std::size_t, const Tensor*, paddle::operators::math::Tensor*, paddle::operators::math::Tensor*) [with DeviceContext = paddle::platform::CPUDeviceContext; T = double]’中:
/root/Paddle/paddle/fluid/operators/math/sample_prob.h:58:46: 警告:此函数中的‘((void)& lbl_dim +8)’在使用前可能未初始化 [-Wmaybe-uninitialized]
const int num_sampled_classes = num_true + num_samples;
~~~~~~~~~^~~~~~~~~~~~~
/root/Paddle/paddle/fluid/operators/math/sample_prob.h:56:15: 警告:此函数中的‘lbl_dim’在使用前可能未初始化 [-Wmaybe-uninitialized]
const int batch_size = lbl_dim[0];
^~~~~~~~~~
[ 11%] Linking CXX static library libdevice_code.a
[ 11%] Built target device_code
[ 11%] Linking CXX static library libsample_prob.a
[ 11%] Built target sample_prob
[ 11%] Linking CXX static library libmask_util.a
[ 11%] Linking CXX static library libmaxouting.a
[ 11%] Built target mask_util
[ 11%] Built target maxouting
make[2]: *** [paddle/fluid/operators/math/CMakeFiles/matrix_bit_code.dir/build.make:66:paddle/fluid/operators/math/CMakeFiles/matrix_bit_code.dir/matrix_bit_code.cc.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:56475:paddle/fluid/operators/math/CMakeFiles/matrix_bit_code.dir/all] 错误 2
[ 11%] Linking CXX static library libshape_inference.a
[ 11%] Built target shape_inference
[ 11%] Linking CXX static library libconcat_and_split.a
[ 11%] Built target concat_and_split
[ 11%] Linking CXX static library libsequence2batch.a
[ 11%] Linking CXX static library libunpooling.a
[ 11%] Built target sequence2batch
[ 11%] Built target unpooling
[ 11%] Linking CXX static library libvol2col.a
[ 11%] Built target vol2col
[ 11%] Linking CXX static library libim2col.a
[ 11%] Built target im2col
[ 11%] Linking CXX static library libsequence_padding.a
[ 11%] Built target sequence_padding
[ 11%] Linking CXX static library libno_need_buffer_vars_inference.a
[ 11%] Built target no_need_buffer_vars_inference
[ 11%] Linking CXX static library libcross_entropy.a
[ 11%] Built target cross_entropy
make[2]: *** [paddle/fluid/operators/math/CMakeFiles/lstm_compute.dir/build.make:66:paddle/fluid/operators/math/CMakeFiles/lstm_compute.dir/lstm_compute.cc.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:57906:paddle/fluid/operators/math/CMakeFiles/lstm_compute.dir/all] 错误 2
[ 11%] Linking CXX static library libheter_wrapper.a
[ 11%] Built target heter_wrapper
make[2]: *** [paddle/fluid/operators/math/CMakeFiles/matrix_inverse.dir/build.make:66:paddle/fluid/operators/math/CMakeFiles/matrix_inverse.dir/matrix_inverse.cc.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:57777:paddle/fluid/operators/math/CMakeFiles/matrix_inverse.dir/all] 错误 2
[ 11%] Linking CXX static library libgarbage_collector.a
[ 11%] Linking CXX static library libpooling.a
[ 11%] Built target garbage_collector
[ 11%] Built target pooling
In file included from /root/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/Tensor:119:0,
from /root/Paddle/paddle/fluid/platform/device_context.h:50,
from /root/Paddle/paddle/fluid/framework/tensor.h:28,
from /root/Paddle/paddle/fluid/operators/math/segment_pooling.h:17,
from /root/Paddle/paddle/fluid/operators/math/segment_pooling.cc:15:
/root/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h: 在静态成员函数‘static void Eigen::internal::TensorExecutor<Expression, Eigen::DefaultDevice, Vectorizable, (Eigen::internal::TiledEvaluation)1>::run(const Expression&, const Eigen::DefaultDevice&) [with Expression = const Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<float, 2, 1, long int>, 0, Eigen::MakePointer>, const Eigen::TensorBroadcastingOp<const Eigen::DSizes<int, 2>, const Eigen::TensorCwiseUnaryOp<Eigen::internal::bind2nd_op<Eigen::internal::scalar_quotient_op<float, float> >, const Eigen::TensorMap<Eigen::Tensor<float, 2, 1, long int>, 0, Eigen::MakePointer> > > >; bool Vectorizable = true]’中:
/root/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h:680:27: 警告:此函数中的‘it[0].Eigen::TensorEvaluator<const Eigen::TensorBroadcastingOp<const Eigen::DSizes<int, 2>, const Eigen::TensorCwiseUnaryOp<Eigen::internal::bind2nd_op<Eigen::internal::scalar_quotient_op<float, float> >, const Eigen::TensorMap<Eigen::Tensor<float, 2, 1, long int>, 0, Eigen::MakePointer> > >, Eigen::DefaultDevice>::BlockBroadcastingIteratorState::count’在使用前可能未初始化 [-Wmaybe-uninitialized]
if (++it[j].count < it[j].size) {
~~~~~~~~~~~~~~^~~~~~~~~~~~
/root/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h:650:52: 附注:‘it[0].Eigen::TensorEvaluator<const Eigen::TensorBroadcastingOp<const Eigen::DSizes<int, 2>, const Eigen::TensorCwiseUnaryOp<Eigen::internal::bind2nd_op<Eigen::internal::scalar_quotient_op<float, float> >, const Eigen::TensorMap<Eigen::Tensor<float, 2, 1, long int>, 0, Eigen::MakePointer> > >, Eigen::DefaultDevice>::BlockBroadcastingIteratorState::count’在此声明
array<BlockBroadcastingIteratorState, NumDims> it;
^~
/root/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h: 在静态成员函数‘static void Eigen::internal::TensorExecutor<Expression, Eigen::DefaultDevice, Vectorizable, (Eigen::internal::TiledEvaluation)1>::run(const Expression&, const Eigen::DefaultDevice&) [with Expression = const Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<double, 2, 1, long int>, 0, Eigen::MakePointer>, const Eigen::TensorBroadcastingOp<const Eigen::DSizes<int, 2>, const Eigen::TensorCwiseUnaryOp<Eigen::internal::bind2nd_op<Eigen::internal::scalar_quotient_op<double, double> >, const Eigen::TensorMap<Eigen::Tensor<double, 2, 1, long int>, 0, Eigen::MakePointer> > > >; bool Vectorizable = true]’中:
/root/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h:680:27: 警告:此函数中的‘it[0].Eigen::TensorEvaluator<const Eigen::TensorBroadcastingOp<const Eigen::DSizes<int, 2>, const Eigen::TensorCwiseUnaryOp<Eigen::internal::bind2nd_op<Eigen::internal::scalar_quotient_op<double, double> >, const Eigen::TensorMap<Eigen::Tensor<double, 2, 1, long int>, 0, Eigen::MakePointer> > >, Eigen::DefaultDevice>::BlockBroadcastingIteratorState::count’在使用前可能未初始化 [-Wmaybe-uninitialized]
if (++it[j].count < it[j].size) {
~~~~~~~~~~~~~~^~~~~~~~~~~~
/root/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h:650:52: 附注:‘it[0].Eigen::TensorEvaluator<const Eigen::TensorBroadcastingOp<const Eigen::DSizes<int, 2>, const Eigen::TensorCwiseUnaryOp<Eigen::internal::bind2nd_op<Eigen::internal::scalar_quotient_op<double, double> >, const Eigen::TensorMap<Eigen::Tensor<double, 2, 1, long int>, 0, Eigen::MakePointer> > >, Eigen::DefaultDevice>::BlockBroadcastingIteratorState::count’在此声明
array<BlockBroadcastingIteratorState, NumDims> it;
^~
[ 11%] Linking CXX static library libsegment_pooling.a
[ 11%] Built target segment_pooling
make: *** [Makefile:133:all] 错误 2
efzxgjgh6#
@1205469665 这个不是cmake配置问题,是最后加载编译成的 so动态库文件时,报
无法页面对齐
,应该是CPU问题, JuliaLang/julia#33293 这里也是一样的问题huus2vyu7#
https://paddle-inference.readthedocs.io/en/latest/guides/hardware_support/cpu_phytium_cn.html#id2
我只加载paddle inference的demo时发现可以运行不会报错。对比了上面网页中关于飞腾和鲲鹏系列编译选项,发现跟github页面还有serving编译页面有所不同的是多了-DCMAKE_CXX_FLAGS="-Wno-error -w",编译时加入此选项则验证通过。