# # spec file for package ComputeLibrary # # Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define so_ver 29 # Disable validation tests by default due to opencl needing to be set up %bcond_with computelibrary_tests Name: ComputeLibrary Version: 22.11 Release: 1.1 Summary: ARM Compute Library License: MIT URL: https://developer.arm.com/technologies/compute-library Source: https://github.com/ARM-software/ComputeLibrary/archive/v%{version}.tar.gz#/ComputeLibrary-%{version}.tar.gz BuildRequires: gcc-c++ BuildRequires: git-core BuildRequires: ocl-icd-devel BuildRequires: scons >= 2.4 Recommends: %{name}-sample-data ExclusiveArch: aarch64 armv7l armv7hl x86_64 %description A software library for computer vision and machine learning. The Compute Library is a collection of low-level functions optimized for Arm CPU and GPU architectures targeted at image processing, computer vision, and machine learning. Examples binaries part. %package -n libarm_compute%{so_ver} Summary: ARM Compute Library %description -n libarm_compute%{so_ver} A software library for computer vision and machine learning. The Compute Library is a collection of low-level functions optimized for Arm CPU and GPU architectures targeted at image processing, computer vision, and machine learning. Library part. %package -n libarm_compute_core%{so_ver} Summary: ARM Compute Library - Core part %description -n libarm_compute_core%{so_ver} A software library for computer vision and machine learning. The Compute Library is a collection of low-level functions optimized for Arm CPU and GPU architectures targeted at image processing, computer vision, and machine learning. Library part. %package -n libarm_compute_graph%{so_ver} Summary: ARM Compute Library - Graph part %description -n libarm_compute_graph%{so_ver} A software library for computer vision and machine learning. The Compute Library is a collection of low-level functions optimized for Arm CPU and GPU architectures targeted at image processing, computer vision, and machine learning. Library part. %package devel Summary: ARM Compute Library -- devel Requires: %{name} = %{version} Requires: libarm_compute%{so_ver} = %{version} Requires: libarm_compute_core%{so_ver} = %{version} Requires: libarm_compute_graph%{so_ver} = %{version} # stb headers are required Requires: stb-devel %description devel A software library for computer vision and machine learning. The Compute Library is a collection of low-level functions optimized for Arm CPU and GPU architectures targeted at image processing, computer vision, and machine learning. Devel part, including headers. %package sample-data %define sampledir sample-data Summary: Compute Library sample data %description sample-data Free *.npy and *.ppm files to use with example binaries. %prep %autosetup -p1 -n ComputeLibrary-%{version} %build scons os=linux \ build=native \ install_dir=install \ set_soname=1 \ examples=1 \ opencl=1 \ %if %{with computelibrary_tests} validation_tests=1 \ %else validation_tests=0 \ %endif %ifarch aarch64 aarch64_ilp32 neon=1 arch=arm64-v8a \ %endif %ifarch armv7l armv7hl neon=0 arch=armv7a \ %endif %ifarch x86_64 neon=0 arch=x86_64 \ %endif extra_cxx_flags="%{optflags}" \ Werror=0 %{?_smp_mflags} %install rm build/examples/*.o rm build/examples/gemm_tuner/*.o mv build/examples/gemm_tuner/* build/examples rm -r build/examples/gemm_tuner mkdir -p %{buildroot}%{_bindir} install -Dm0755 build/examples/* %{buildroot}%{_bindir}/ mkdir -p %{buildroot}%{_libdir} cp -a build/*.so* %{buildroot}%{_libdir}/ # FIXME: scons should install headers thanks to: install_dir=%%{buildroot}%%{_prefix} but this is broken mkdir -p %{buildroot}%{_includedir}/ cp -a arm_compute/ support/ utils/ include/half/ include/libnpy/ %{buildroot}%{_includedir}/ # Remove *.cpp files from includedir rm -f $(find %{buildroot}%{_includedir}/ -name *.cpp) # Install sample data mkdir -p %{buildroot}%{_datadir}/ComputeLibrary/%{sampledir} cp -r data/* %{buildroot}%{_datadir}/ComputeLibrary/%{sampledir} # Install scripts install -Dm0755 scripts/* %{buildroot}%{_bindir} rm -f %{buildroot}%{_bindir}/*.h # Fix Python scripts interpreter for pyfile in `ls %{buildroot}%{_bindir}/*.py`; do sed -i -e 's|#!%{_bindir}/env python|#!%{_bindir}/python|' $pyfile done %post -n libarm_compute%{so_ver} -p /sbin/ldconfig %postun -n libarm_compute%{so_ver} -p /sbin/ldconfig %post -n libarm_compute_core%{so_ver} -p /sbin/ldconfig %postun -n libarm_compute_core%{so_ver} -p /sbin/ldconfig %post -n libarm_compute_graph%{so_ver} -p /sbin/ldconfig %postun -n libarm_compute_graph%{so_ver} -p /sbin/ldconfig %if %{with computelibrary_tests} %check LD_LIBRARY_PATH="build/" build/tests/arm_compute_validation %endif %files %{_bindir}/* %files -n libarm_compute%{so_ver} %license LICENSE %{_libdir}/libarm_compute.so.%{so_ver}* %files -n libarm_compute_core%{so_ver} %license LICENSE %{_libdir}/libarm_compute_core.so.%{so_ver}* %files -n libarm_compute_graph%{so_ver} %license LICENSE %{_libdir}/libarm_compute_graph.so.%{so_ver}* %files devel %dir %{_includedir}/arm_compute %dir %{_includedir}/half %dir %{_includedir}/libnpy %dir %{_includedir}/support %dir %{_includedir}/utils %{_includedir}/arm_compute/* %{_includedir}/half/* %{_includedir}/libnpy/* %{_includedir}/support/* %{_includedir}/utils/* %{_libdir}/*.so %files sample-data %dir %{_datadir}/ComputeLibrary/ %{_datadir}/ComputeLibrary/%{sampledir} %changelog * Mon Nov 28 2022 Guillaume GARDET - Update to 22.11: * Public major release * Documentation (API, changelogs, build guide, contribution guide, errata, etc.) available here: https://arm-software.github.io/ComputeLibrary/v22.11 * Tue Aug 30 2022 Guillaume GARDET - Update to 22.08: * Public major release * Documentation (API, changelogs, build guide, contribution guide, errata, etc.) available here: https://arm-software.github.io/ComputeLibrary/v22.08 - Drop upstream patch: * fix-with-gcc12.patch * Tue May 31 2022 Guillaume GARDET - Update to 22.05: * Public major release * Documentation (API, changelogs, build guide, contribution guide, errata, etc.) available here: https://arm-software.github.io/ComputeLibrary/v22.05 - Fix build with GCC12: * fix-with-gcc12.patch * Tue Mar 15 2022 Guillaume GARDET - Update to 22.02: * Public major release * Documentation (API, changelogs, build guide, contribution guide, errata, etc.) available here: https://arm-software.github.io/ComputeLibrary/v22.02 * Wed Dec 1 2021 Guillaume GARDET - Update to 21.11: * Public major release * Documentation (API, changelogs, build guide, contribution guide, errata, etc.) available here: https://arm-software.github.io/ComputeLibrary/v21.11/ * Thu Sep 9 2021 Guillaume GARDET - Update to 21.08: * Public major release * Documentation (API, changelogs, build guide, contribution guide, errata, etc.) available here: https://arm-software.github.io/ComputeLibrary/v21.08/ * Fri May 21 2021 Guillaume GARDET - Update to 21.05: * Public major release * Documentation (API, changelogs, build guide, contribution guide, errata, etc.) available here: https://arm-software.github.io/ComputeLibrary/v21.05/ - Drop patch which is not needed anymore: * acl-fix-packaging-issue.patch * Wed Apr 7 2021 Guillaume GARDET - Add patch to fix build of ArmNN with openCL: * acl-fix-packaging-issue.patch * Wed Apr 7 2021 Guillaume GARDET - Package separately libarm_compute_core and libarm_compute_graph * Mon Mar 29 2021 Guillaume GARDET - Update to 21.02: * Public major release * Documentation (API, changelogs, build guide, contribution guide, errata, etc.) available here: https://arm-software.github.io/ComputeLibrary/v21.02/ * Wed Dec 9 2020 Guillaume GARDET - Update to 20.11: * Public major release * Deprecation notice: Deprecated GLES functions and kernels Deprecated Neon and OpenCL Computer Vision functions * Documentation (API, changelogs, build guide, contribution guide, errata, etc.) available here: https://arm-software.github.io/ComputeLibrary/v20.11/ * Thu Sep 3 2020 Guillaume GARDET - Update to 20.08: * Public major release * Documentation (API, changelogs, build guide, contribution guide, errata, etc.) available here: https://arm-software.github.io/ComputeLibrary/v20.08/ * Thu Jun 4 2020 Guillaume GARDET - Update to 20.05: * Public major release * Documentation (API, changelogs, build guide, contribution guide, errata, etc.) available here: https://arm-software.github.io/ComputeLibrary/v20.05/ * Mon Mar 9 2020 Guillaume GARDET - Update to 20.02.1 (no upstream changelog) * Tue Feb 25 2020 Tomáš Chvátal - Update to 19.11.1: * Fix offset calculation in NEReductionOperationKernel. * Fix data layout in NEScaleKernel for nhwc. * Retain configuration step data layout to avoid side-effects. * Perform sqrt in double domain for L2 pooling. * Fix output shape calculation for Reduce Mean. * Tue Feb 25 2020 Tomáš Chvátal - Cleanup a bit with spec-cleaner * Fri Dec 6 2019 Guillaume GARDET - Update to 19.11 (no upstream changelog) - Revert previous commit to disable neon on armv7 * Tue Nov 26 2019 Guillaume GARDET - Enable neon on armv7 * Wed Oct 9 2019 Guillaume GARDET - Fix Python scripts interpreter - Fix -devel package dep - Drop gcc 4.8 workaround * Thu Sep 5 2019 Guillaume GARDET - Update to 19.08 (no upstream changelog) * Mon Jun 3 2019 Guillaume GARDET - Add validation test option (disabled by default since CL is unusable inside OBS) * Mon Jun 3 2019 Guillaume GARDET - Update to 19.05 (no upstream changelog) - Remove upstream patch: * computelibrary-fix_opencl.patch * Fri Apr 19 2019 Guillaume GARDET - Package scripts * Thu Apr 11 2019 Guillaume GARDET - Add patch to fix build with openCL: * computelibrary-fix_opencl.patch * Wed Apr 3 2019 Guillaume GARDET - Update to 19.02 * Mon Jan 14 2019 Guillaume GARDET - Update to 18.11 * Thu Sep 13 2018 guillaume.gardet@opensuse.org - Update to 18.08 - Remove upstreamed patches: * fix_build_with_scons3.patch * fix_c++11_syntax.patch * Tue Jun 5 2018 guillaume.gardet@opensuse.org - Add missing includes - Add sample-data * Mon Jun 4 2018 guillaume.gardet@opensuse.org - Add soname option and require scons >= 2.4 - Add a -devel package * Fri Jun 1 2018 guillaume.gardet@opensuse.org - Rename from arm_compute to ComputeLibrary (upstream name) - Split libraries to a separate package * Fri Jun 1 2018 guillaume.gardet@opensuse.org - Update to 18.05 - Add patches to fix builds on Leap 15.0+: * fix_build_with_scons3.patch * fix_c++11_syntax.patch - Disable openCL on Leap 15.0+ since the build script is not yet fully compatible with Python3 and breaks when openCL is enabled * Mon Apr 3 2017 afaerber@suse.de - Initial release 17.03.1