Hello community, here is the log from the commit of package armnn for openSUSE:Factory checked in at 2020-03-11 18:50:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/armnn (Old) and /work/SRC/openSUSE:Factory/.armnn.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "armnn" Wed Mar 11 18:50:08 2020 rev:5 rq:783721 version:20.02 Changes: -------- --- /work/SRC/openSUSE:Factory/armnn/armnn.changes 2020-03-01 21:27:35.816505643 +0100 +++ /work/SRC/openSUSE:Factory/.armnn.new.3160/armnn.changes 2020-03-11 18:52:00.367585270 +0100 @@ -1,0 +2,21 @@ +Wed Mar 11 08:41:20 UTC 2020 - Guillaume GARDET <[email protected]> + +- Fix build on Leap 15.2 + +------------------------------------------------------------------- +Mon Mar 9 17:47:42 UTC 2020 - Guillaume GARDET <[email protected]> + +- Update to 20.02: + * Changelog: https://github.com/ARM-software/armnn/releases/tag/v20.02 + * Drop upstream patch: + - armnn-fix_include.patch + * Refresh patch: + - 0006-armnn-mobilenet-test-example.patch + * Replace downstream patch: + - 0007-enable-use-of-arm-compute-shared-library.patch + by upstream patch: + - armnn-enable-use-of-arm-compute-shared-library.patch + * Add 'vim' as BuildRequires since it needs 'xxd' tool +- Use TensorFlow 2 also on Leap 15.2 / SLE15SP2 + +------------------------------------------------------------------- Old: ---- 0007-enable-use-of-arm-compute-shared-library.patch armnn-19.11.tar.gz armnn-fix_include.patch New: ---- armnn-20.02.tar.gz armnn-enable-use-of-arm-compute-shared-library.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ armnn.spec ++++++ --- /var/tmp/diff_new_pack.sl3mqD/_old 2020-03-11 18:52:01.951585979 +0100 +++ /var/tmp/diff_new_pack.sl3mqD/_new 2020-03-11 18:52:01.951585979 +0100 @@ -18,17 +18,12 @@ # Disable LTO until UnitTests passes with LTO enabled - https://github.com/ARM-software/armnn/issues/341 %define _lto_cflags %{nil} - %define target @BUILD_FLAVOR@%{nil} %if "%{target}" != "" %define package_suffix -%{target} %endif -# Use Tensorflow 2 for Tumbleweed only -%if 0%{?suse_version} > 1500 +# Use Tensorflow version 2 %define tf_version_2 1 -%else -%define tf_version_2 0 -%endif # Compute library has neon enabled for aarch64 only %ifarch aarch64 %bcond_without compute_neon @@ -58,8 +53,8 @@ %else %bcond_with armnn_flatbuffers %endif -# Enable TensorFlow only on TW aarch64 and x86_64 (TF fails to build on Leap 15.x and on armv7 TW) -%if 0%{?suse_version} > 1500 +# Enable TensorFlow on TW and Leap 15.2/SLE15SP2 for aarch64 and x86_64 (TF fails to build on armv7) +%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150200 %ifarch aarch64 x86_64 %bcond_without armnn_tf %else @@ -74,8 +69,8 @@ %else %bcond_with armnn_onnx %endif -%define version_major 19 -%define version_minor 11 +%define version_major 20 +%define version_minor 02 # Do not package ArmnnConverter and ArmnnQuantizer, by default %bcond_with armnn_tools # Enable CAFFE @@ -89,10 +84,8 @@ URL: https://developer.arm.com/products/processors/machine-learning/arm-nn Source0: https://github.com/ARM-software/armnn/archive/v%{version}.tar.gz#/armnn-%{version}.tar.gz Source1: armnn-rpmlintrc -# PATCH-FIX-UPSTREAM - https://github.com/ARM-software/armnn/issues/311 -Patch1: armnn-fix_include.patch -# Patch: http://arago-project.org/git/?p=meta-arago.git;a=blob;f=meta-arago-extras/recipes-support/armnn/armnn/0007-enable-use-of-arm-compute-shared-library.patch;hb=master -Patch2: 0007-enable-use-of-arm-compute-shared-library.patch +# PATCH-FIX-UPSTREAM - https://github.com/ARM-software/armnn/commit/6445cfff7519effd1df04eac88ae17d6e4e6693b +Patch1: armnn-enable-use-of-arm-compute-shared-library.patch # PATCHES to add downstream ArmnnExamples binary - https://layers.openembedded.org/layerindex/recipe/87610/ Patch200: 0003-add-more-test-command-line-arguments.patch Patch201: 0005-add-armnn-mobilenet-test-example.patch @@ -100,15 +93,16 @@ Patch203: 0009-command-line-options-for-video-port-selection.patch Patch204: 0010-armnnexamples-update-for-19.08-modifications.patch Patch205: armnn-fix_find_opencv.patch -BuildRequires: ComputeLibrary-devel >= 19.08 +BuildRequires: ComputeLibrary-devel >= %{version_major}.%{version_minor} BuildRequires: cmake >= 3.0.2 BuildRequires: gcc-c++ BuildRequires: protobuf-devel BuildRequires: python-rpm-macros +BuildRequires: valgrind-devel +BuildRequires: vim # Make armnn-opencl pulls lib*-opencl, and armnn pulls non opencl libs Requires: libarmnn%{version_major}%{?package_suffix} = %{version} ExcludeArch: %ix86 -BuildRequires: valgrind-devel %if 0%{?suse_version} < 1330 BuildRequires: boost-devel >= 1.59 %else @@ -363,7 +357,6 @@ %prep %setup -q -n armnn-%{version} %patch1 -p1 -%patch2 -p1 %patch200 -p1 %patch201 -p1 %patch202 -p1 @@ -371,11 +364,8 @@ %patch204 -p1 %patch205 -p1 # Boost fixes for dynamic linking -sed -i 's/add_definitions("-DBOOST_ALL_NO_LIB")/add_definitions("-DBOOST_ALL_DYN_LINK")/' ./cmake/GlobalConfig.cmake -sed -i 's/set(Boost_USE_STATIC_LIBS ON)/set(Boost_USE_STATIC_LIBS OFF)/' ./cmake/GlobalConfig.cmake -sed -i 's/find_package(Boost 1.59 REQUIRED COMPONENTS unit_test_framework system filesystem log program_options)/find_package(Boost 1.59 REQUIRED COMPONENTS unit_test_framework system filesystem log thread program_options)/' ./cmake/GlobalConfig.cmake -# Build fix -sed -i 's/-Wsign-conversion//' ./cmake/GlobalConfig.cmake +sed -i 's/find_package(Boost 1.59 REQUIRED COMPONENTS unit_test_framework system filesystem program_options)/find_package(Boost 1.59 REQUIRED COMPONENTS unit_test_framework system filesystem log thread program_options)/' ./cmake/GlobalConfig.cmake + %build %if %{with armnn_onnx} @@ -383,8 +373,22 @@ PROTO=$(find %{_libdir} -name onnx.proto) protoc $PROTO --proto_path=. --proto_path=%{_includedir} --proto_path=$(dirname $(find %{_libdir} -name onnx)) --cpp_out=./onnx_deps %endif +%if 0%{?suse_version} > 1500 +export CXX_ADDITIONAL_FLAGS="$CXX_ADDITIONAL_FLAGS -Wno-error=deprecated-copy" +%endif +%if 0%{?sle_version} == 150200 +%if %{with armnn_tf} +%if %{tf_version_2} +# TensorFlow2 in Leap 15.2 shows erros on major/minor due to '-Werror' option: +# /usr/lib/python3.6/site-packages/tensorflow_core/include/tensorflow/core/protobuf/autotuning.pb.cc:930:13: error: In the GNU C Library, "major" is defined by <sys/sysmacros.h>. +# For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "major", include <sys/sysmacros.h> directly. +sed -i 's/-Werror//' ./cmake/GlobalConfig.cmake +%endif +%endif +%endif %cmake \ - -DCMAKE_CXX_FLAGS:STRING="%{optflags} -pthread" \ + -DSHARED_BOOST=1 \ + -DCMAKE_CXX_FLAGS:STRING="%{optflags} -pthread $CXX_ADDITIONAL_FLAGS -Wno-error=implicit-fallthrough -Wno-error=unused-parameter" \ -DBOOST_LIBRARYDIR=%{_libdir} \ %if %{with armnn_caffe} -DBUILD_CAFFE_PARSER=ON \ @@ -592,6 +596,15 @@ %defattr(-,root,root) %dir %{_includedir}/armnn/ %{_includedir}/armnn/*.hpp +%dir %{_includedir}/armnn/backends +%{_includedir}/armnn/backends/CMakeLists.txt +%{_includedir}/armnn/backends/*.hpp +%dir %{_includedir}/armnn/backends/profiling +%{_includedir}/armnn/backends/profiling/*.hpp +%dir %{_includedir}/armnn/profiling +%{_includedir}/armnn/profiling/*.hpp +%dir %{_includedir}/armnnUtils +%{_includedir}/armnnUtils/*.hpp %dir %{_includedir}/armnnCaffeParser/ %{_includedir}/armnnCaffeParser/ICaffeParser.hpp %dir %{_includedir}/armnnOnnxParser/ ++++++ 0005-add-armnn-mobilenet-test-example.patch ++++++ --- /var/tmp/diff_new_pack.sl3mqD/_old 2020-03-11 18:52:01.975585990 +0100 +++ /var/tmp/diff_new_pack.sl3mqD/_new 2020-03-11 18:52:01.975585990 +0100 @@ -6,6 +6,7 @@ Upstream-Status: Inappropriate [TI only test code] Signed-off-by: Qin Su <[email protected]> Signed-off-by: Djordje Senicic <[email protected]> +[Guillaume's update: Add boost_log dep] --- tests/CMakeLists.txt | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) @@ -21,7 +22,7 @@ # UnitTests include(CheckIncludeFiles) -@@ -348,3 +351,41 @@ if(BUILD_ARMNN_QUANTIZER) +@@ -348,3 +351,42 @@ if(BUILD_ARMNN_QUANTIZER) add_executable_ex(ImageCSVFileGenerator ${ImageCSVFileGenerator_sources}) ImageTensorExecutor(ImageCSVFileGenerator) endif() @@ -57,6 +58,7 @@ + endif() + + target_link_libraries(ArmnnExamples ++ ${Boost_LOG_LIBRARY} + ${Boost_SYSTEM_LIBRARY} + ${Boost_FILESYSTEM_LIBRARY} + ${Boost_PROGRAM_OPTIONS_LIBRARY} ++++++ 0006-armnn-mobilenet-test-example.patch ++++++ --- /var/tmp/diff_new_pack.sl3mqD/_old 2020-03-11 18:52:01.979585991 +0100 +++ /var/tmp/diff_new_pack.sl3mqD/_new 2020-03-11 18:52:01.979585991 +0100 @@ -5,6 +5,10 @@ Upstream-Status: Inappropriate [TI only test code] Signed-off-by: Qin Su <[email protected]> + +[Guillaume's update: s#Logging.hpp#armnn/Logging.hpp#] +[Guillaume's update: Add #include <boost/log/trivial.hpp>] +[Guillaume's update: Drop armnnUtils::ConfigureLogging(...)] --- tests/ArmnnExamples/ArmnnExamples.cpp | 654 ++++++++++++++++++++++++++++++++++ 1 file changed, 654 insertions(+) @@ -47,6 +51,7 @@ +// See LICENSE file in the project root for full license information. +// +#include <armnn/ArmNN.hpp> ++#include <boost/log/trivial.hpp> + +#include <utility> +#include <armnn/TypesUtils.hpp> @@ -65,7 +70,7 @@ +#endif +#include "CsvReader.hpp" +#include "../InferenceTest.hpp" -+#include <Logging.hpp> ++#include <armnn/Logging.hpp> +#include <Profiling.hpp> + +#include <boost/algorithm/string/trim.hpp> @@ -583,7 +588,6 @@ + armnn::LogSeverity level = armnn::LogSeverity::Debug; +#endif + armnn::ConfigureLogging(true, true, level); -+ armnnUtils::ConfigureLogging(boost::log::core::get().get(), true, true, level); + + std::string testCasesFile; + ++++++ armnn-19.11.tar.gz -> armnn-20.02.tar.gz ++++++ ++++ 53846 lines of diff (skipped) ++++++ armnn-enable-use-of-arm-compute-shared-library.patch ++++++ >From 6445cfff7519effd1df04eac88ae17d6e4e6693b Mon Sep 17 00:00:00 2001 From: Matthew Bentham <[email protected]> Date: Tue, 10 Mar 2020 11:13:17 +0000 Subject: [PATCH] Github #326 Allow linking against shared Compute Library As a last resort, check for shared Compute Library in standard paths. This will work for Linux distribution builds where no static Compute Library has been installed. Change-Id: I1ea11d184ef9dcf4480ae0687a4ba81b402c5b2d Signed-off-by: Matthew Bentham <[email protected]> --- cmake/GlobalConfig.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmake/GlobalConfig.cmake b/cmake/GlobalConfig.cmake index f4e4ad54..0df7cd40 100644 --- a/cmake/GlobalConfig.cmake +++ b/cmake/GlobalConfig.cmake @@ -254,6 +254,14 @@ if(ARMCOMPUTENEON OR ARMCOMPUTECL) find_library(ARMCOMPUTE_CORE_LIBRARY_DEBUG NAMES arm_compute_core-static) find_library(ARMCOMPUTE_CORE_LIBRARY_RELEASE NAMES arm_compute_core-static) + # In case it wasn't there, try the dynamic libraries + # This case will get used in a linux setup where the Compute Library + # has been installed in a standard system library path as a dynamic library + find_library(ARMCOMPUTE_LIBRARY_DEBUG NAMES arm_compute) + find_library(ARMCOMPUTE_LIBRARY_RELEASE NAMES arm_compute) + find_library(ARMCOMPUTE_CORE_LIBRARY_DEBUG NAMES arm_compute_core) + find_library(ARMCOMPUTE_CORE_LIBRARY_RELEASE NAMES arm_compute_core) + set(ARMCOMPUTE_LIBRARIES debug ${ARMCOMPUTE_LIBRARY_DEBUG} ${ARMCOMPUTE_CORE_LIBRARY_DEBUG} optimized ${ARMCOMPUTE_LIBRARY_RELEASE} ${ARMCOMPUTE_CORE_LIBRARY_RELEASE} )
