Skip to content

Commit

Permalink
misc/opennn: fix build on powerpc64
Browse files Browse the repository at this point in the history
/usr/bin/c++ -D__Cpp11__ -Dopennn_EXPORTS  -fopenmp=libomp -O2 -pipe -fstack-protector-strong -fno-strict-aliasing   -DNDEBUG -std=gnu++17 -fPIC -MD -MT opennn/CMakeFiles/opennn.dir/adaptive_moment_estimation.cpp.o -MF opennn/CMakeFiles/opennn.dir/adaptive_moment_estimation.cpp.o.d -o opennn/CMakeFiles/opennn.dir/adaptive_moment_estimation.cpp.o -c /wrkdirs/usr/ports/misc/opennn/work/opennn-6.0.4/opennn/adaptive_moment_estimation.cpp
In file included from /wrkdirs/usr/ports/misc/opennn/work/opennn-6.0.4/opennn/adaptive_moment_estimation.cpp:9:
In file included from /wrkdirs/usr/ports/misc/opennn/work/opennn-6.0.4/opennn/adaptive_moment_estimation.h:32:
In file included from /wrkdirs/usr/ports/misc/opennn/work/opennn-6.0.4/opennn/loss_index.h:23:
In file included from /wrkdirs/usr/ports/misc/opennn/work/opennn-6.0.4/opennn/config.h:34:
In file included from /wrkdirs/usr/ports/misc/opennn/work/opennn-6.0.4/opennn/../eigen/unsupported/Eigen/CXX11/Tensor:14:
In file included from /wrkdirs/usr/ports/misc/opennn/work/opennn-6.0.4/opennn/../eigen/unsupported/Eigen/CXX11/../../../Eigen/Core:210:
/wrkdirs/usr/ports/misc/opennn/work/opennn-6.0.4/opennn/../eigen/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/AltiVec/PacketMath.h:1345:32: error: use of undeclared identifier 'vec_sqrt'; did you mean 'vec_rsqrt'?
  BF16_TO_F32_UNARY_OP_WRAPPER(vec_sqrt, a);
                               ^~~~~~~~
                               vec_rsqrt
/wrkdirs/usr/ports/misc/opennn/work/opennn-6.0.4/opennn/../eigen/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/AltiVec/PacketMath.h:1302:22: note: expanded from macro 'BF16_TO_F32_UNARY_OP_WRAPPER'
  Packet4f op_even = OP(a_even);\
                     ^
/usr/lib/clang/14.0.5/include/altivec.h:8501:34: note: 'vec_rsqrt' declared here
static vector float __ATTRS_o_ai vec_rsqrt(vector float __a) {
  • Loading branch information
pkubaj committed Sep 5, 2023
1 parent 6ba4097 commit 72ba479
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions misc/opennn/Makefile
Expand Up @@ -23,6 +23,7 @@ CMAKE_OFF= OpenNN_BUILD_EXAMPLES OpenNN_BUILD_TESTS
CMAKE_TESTING_ON= OpenNN_BUILD_TESTS # some tests fail, see https://github.com/Artelnics/opennn/issues/229
CMAKE_TESTING_TARGET= tests

CXXFLAGS_powerpc64= -mvsx
LDFLAGS+= -pthread
LDFLAGS_powerpc= -latomic

Expand Down

0 comments on commit 72ba479

Please sign in to comment.