This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 1436 - Eigen doesn't compile with -mfpu=neon option
Summary: Eigen doesn't compile with -mfpu=neon option
Status: RESOLVED FIXED
Alias: None
Product: Eigen
Classification: Unclassified
Component: SVD (show other bugs)
Version: 3.4 (development)
Hardware: ARM - NEON Linux
: Normal Compilation Problem
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-10 12:36 UTC by Eric Ibarra
Modified: 2019-12-04 17:02 UTC (History)
2 users (show)



Attachments
error log (24.12 KB, text/plain)
2017-06-10 12:36 UTC, Eric Ibarra
no flags Details

Description Eric Ibarra 2017-06-10 12:36:14 UTC
Created attachment 789 [details]
error log

I was attempting to build tensorflow 1.2-rc2 which imports Eigen

I tried a couple different commits that both end up producing the same error

specifically:
# Node ID f3a22f35b0444e03a1f65941800b9a2283de1398
# Parent  8c3bb0011530bbc1682e2f423d7d7d81cd32cad2

and

# Node ID a0fb50bbc5d7f19def675ab4ef14720e579d0aab
# Parent  ec59c413bcd004fae679325717a6a9bd2307c8fe

This was run with the following build command: sudo bazel build -c opt --jobs 1 --copt="-mfpu=neon" --copt="-funsafe-math-optimizations" --copt="-ftree-vectorize" --copt="-fomit-frame-pointer" --local_resources 1024,.5,1.0 --verbose_failures tensorflow/tools/pip_package:build_pip_package

I've attached the complete error log, but included the sample below
 
ERROR: /mnt/tensorflow/tensorflow/core/kernels/BUILD:2128:1: C++ compilation of rule '//tensorflow/core/kernels:svd_op' failed: gcc failed: error executing command
  (cd /home/snap/.cache/bazel/_bazel_root/ef9923c1cfd90b0d686a7ea3591643c7/execroot/tensorflow && \
  exec env - \
    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
    PYTHON_BIN_PATH=/usr/bin/python \
    PYTHON_LIB_PATH=/usr/local/lib/python2.7/dist-packages \
    TF_NEED_CUDA=0 \
    TF_NEED_OPENCL=0 \
  /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections '-march=armv7-a' '-mfpu=neon' -funsafe-math-optimizations -ftree-vectorize -fomit-frame-pointer '-std=c++0x' -MD -MF bazel-out/local-opt/bin/tensorflow/core/kernels/_objs/svd_op/tensorflow/core/kernels/svd_op_complex64.pic.d '-frandom-seed=bazel-out/local-opt/bin/tensorflow/core/kernels/_objs/svd_op/tensorflow/core/kernels/svd_op_complex64.pic.o' -fPIC -DEIGEN_MPL2_ONLY -DSNAPPY -iquote . -iquote bazel-out/local-opt/genfiles -iquote external/bazel_tools -iquote bazel-out/local-opt/genfiles/external/bazel_tools -iquote external/protobuf -iquote bazel-out/local-opt/genfiles/external/protobuf -iquote external/eigen_archive -iquote bazel-out/local-opt/genfiles/external/eigen_archive -iquote external/local_config_sycl -iquote bazel-out/local-opt/genfiles/external/local_config_sycl -iquote external/gif_archive -iquote bazel-out/local-opt/genfiles/external/gif_archive -iquote external/jpeg -iquote bazel-out/local-opt/genfiles/external/jpeg -iquote external/com_googlesource_code_re2 -iquote bazel-out/local-opt/genfiles/external/com_googlesource_code_re2 -iquote external/farmhash_archive -iquote bazel-out/local-opt/genfiles/external/farmhash_archive -iquote external/fft2d -iquote bazel-out/local-opt/genfiles/external/fft2d -iquote external/highwayhash -iquote bazel-out/local-opt/genfiles/external/highwayhash -iquote external/png_archive -iquote bazel-out/local-opt/genfiles/external/png_archive -iquote external/zlib_archive -iquote bazel-out/local-opt/genfiles/external/zlib_archive -iquote external/snappy -iquote bazel-out/local-opt/genfiles/external/snappy -isystem external/bazel_tools/tools/cpp/gcc3 -isystem external/protobuf/src -isystem bazel-out/local-opt/genfiles/external/protobuf/src -isystem external/eigen_archive -isystem bazel-out/local-opt/genfiles/external/eigen_archive -isystem external/gif_archive/lib -isystem bazel-out/local-opt/genfiles/external/gif_archive/lib -isystem external/farmhash_archive/src -isystem bazel-out/local-opt/genfiles/external/farmhash_archive/src -isystem external/png_archive -isystem bazel-out/local-opt/genfiles/external/png_archive -isystem external/zlib_archive -isystem bazel-out/local-opt/genfiles/external/zlib_archive -DEIGEN_AVOID_STL_ARRAY -Iexternal/gemmlowp -Wno-sign-compare -fno-exceptions -pthread -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c tensorflow/core/kernels/svd_op_complex64.cc -o bazel-out/local-opt/bin/tensorflow/core/kernels/_objs/svd_op/tensorflow/core/kernels/svd_op_complex64.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
In file included from external/eigen_archive/Eigen/Core:451:0,
                 from external/eigen_archive/Eigen/QR:11,
                 from external/eigen_archive/Eigen/SVD:11,
                 from ./third_party/eigen3/Eigen/SVD:1,
                 from ./tensorflow/core/kernels/svd_op_impl.h:23,
                 from tensorflow/core/kernels/svd_op_complex64.cc:16:
external/eigen_archive/Eigen/src/Core/util/BlasUtil.h: In instantiation of 'struct Eigen::internal::conj_helper<__vector(4) __builtin_neon_sf, Eigen::internal::Packet2cf, false, false>':
external/eigen_archive/Eigen/src/Jacobi/Jacobi.h:339:77:   required from 'void Eigen::internal::apply_rotation_in_the_plane(Eigen::DenseBase<Derived>&, Eigen::DenseBase<Derived>&, const Eigen::JacobiRotation<OtherScalar>&) [with VectorX = Eigen::Block<Eigen::Matrix<std::complex<float>, -1, -1, 1, -1, -1>, 1, -1, true>; VectorY = Eigen::Block<Eigen::Matrix<std::complex<float>, -1, -1, 1, -1, -1>, 1, -1, true>; OtherScalar = float]'
external/eigen_archive/Eigen/src/Jacobi/Jacobi.h:282:48:   required from 'void Eigen::MatrixBase<Derived>::applyOnTheLeft(Eigen::Index, Eigen::Index, const Eigen::JacobiRotation<OtherScalar>&) [with OtherScalar = float; Derived = Eigen::Matrix<std::complex<float>, -1, -1, 1, -1, -1>; Eigen::Index = int]'
external/eigen_archive/Eigen/src/SVD/JacobiSVD.h:725:13:   required from 'Eigen::JacobiSVD<MatrixType, QRPreconditioner>& Eigen::JacobiSVD<MatrixType, QRPreconditioner>::compute(const MatrixType&, unsigned int) [with _MatrixType = Eigen::Matrix<std::complex<float>, -1, -1, 1, -1, -1>; int QRPreconditioner = 2; Eigen::JacobiSVD<MatrixType, QRPreconditioner>::MatrixType = Eigen::Matrix<std::complex<float>, -1, -1, 1, -1, -1>]'
external/eigen_archive/Eigen/src/SVD/JacobiSVD.h:548:41:   required from 'Eigen::JacobiSVD<MatrixType, QRPreconditioner>::JacobiSVD(const MatrixType&, unsigned int) [with _MatrixType = Eigen::Matrix<std::complex<float>, -1, -1, 1, -1, -1>; int QRPreconditioner = 2; Eigen::JacobiSVD<MatrixType, QRPreconditioner>::MatrixType = Eigen::Matrix<std::complex<float>, -1, -1, 1, -1, -1>]'
external/eigen_archive/Eigen/src/SVD/BDCSVD.h:252:57:   required from 'Eigen::BDCSVD<_MatrixType>& Eigen::BDCSVD<MatrixType>::compute(const MatrixType&, unsigned int) [with _MatrixType = Eigen::Matrix<std::complex<float>, -1, -1, 1, -1, -1>; Eigen::BDCSVD<MatrixType>::MatrixType = Eigen::Matrix<std::complex<float>, -1, -1, 1, -1, -1>]'
external/eigen_archive/Eigen/src/SVD/BDCSVD.h:137:39:   required from 'Eigen::BDCSVD<MatrixType>::BDCSVD(const MatrixType&, unsigned int) [with _MatrixType = Eigen::Matrix<std::complex<float>, -1, -1, 1, -1, -1>; Eigen::BDCSVD<MatrixType>::MatrixType = Eigen::Matrix<std::complex<float>, -1, -1, 1, -1, -1>]'
./tensorflow/core/kernels/svd_op_impl.h:88:49:   required from 'void tensorflow::SvdOp<Scalar>::ComputeMatrix(tensorflow::OpKernelContext*, const ConstMatrixMaps&, tensorflow::SvdOp<Scalar>::MatrixMaps*) [with Scalar = std::complex<float>; tensorflow::SvdOp<Scalar>::ConstMatrixMaps = tensorflow::gtl::InlinedVector<Eigen::Map<const Eigen::Matrix<std::complex<float>, -1, -1, 1, -1, -1>, 0, Eigen::Stride<0, 0> >, 4>; tensorflow::SvdOp<Scalar>::MatrixMaps = tensorflow::gtl::InlinedVector<Eigen::Map<Eigen::Matrix<std::complex<float>, -1, -1, 1, -1, -1>, 0, Eigen::Stride<0, 0> >, 4>]'
tensorflow/core/kernels/svd_op_complex64.cc:23:1:   required from here
external/eigen_archive/Eigen/src/Core/util/BlasUtil.h:63:74: error: no type named 'ReturnType' in 'struct Eigen::ScalarBinaryOpTraits<__vector(4) __builtin_neon_sf, Eigen::internal::Packet2cf, Eigen::internal::scalar_product_op<__vector(4) __builtin_neon_sf, Eigen::internal::Packet2cf> >'
   typedef typename ScalarBinaryOpTraits<LhsScalar,RhsScalar>::ReturnType Scalar;
Comment 1 Gael Guennebaud 2017-06-15 08:19:25 UTC
This should be fixed by the following commit:

https://bitbucket.org/eigen/eigen/commits/d781c1de9834/
Summary:     Bug 1436: fix compilation of Jacobi rotations with ARM NEON, some specializations of internal::conj_helper were missing.

but I cannot test right now. Could someone try with the head of the default branch to confirm it? If everything is green, I'll backport the fix.
Comment 3 Nobody 2019-12-04 17:02:24 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1436.

Note You need to log in before you can comment on or make changes to this bug.