2022-12-23 13:15:17 +08:00
|
|
|
#
|
|
|
|
|
# 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
|
2022-12-15 15:36:23 +08:00
|
|
|
# Disable validation tests by default due to opencl needing to be set up
|
|
|
|
|
%bcond_with computelibrary_tests
|
|
|
|
|
Name: ComputeLibrary
|
|
|
|
|
Version: 22.11
|
2022-12-23 13:15:17 +08:00
|
|
|
Release: 1.1
|
2022-12-15 15:36:23 +08:00
|
|
|
Summary: ARM Compute Library
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://developer.arm.com/technologies/compute-library
|
2022-12-23 13:15:17 +08:00
|
|
|
Source: https://github.com/ARM-software/ComputeLibrary/archive/v%{version}.tar.gz#/ComputeLibrary-%{version}.tar.gz
|
2022-12-15 15:36:23 +08:00
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
BuildRequires: git-core
|
2022-12-23 13:15:17 +08:00
|
|
|
BuildRequires: ocl-icd-devel
|
2022-12-15 15:36:23 +08:00
|
|
|
BuildRequires: scons >= 2.4
|
|
|
|
|
Recommends: %{name}-sample-data
|
2022-12-23 13:15:17 +08:00
|
|
|
ExclusiveArch: aarch64 armv7l armv7hl x86_64
|
2022-12-15 15:36:23 +08:00
|
|
|
|
|
|
|
|
%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.
|
|
|
|
|
|
2022-12-23 13:15:17 +08:00
|
|
|
%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.
|
|
|
|
|
|
2022-12-15 15:36:23 +08:00
|
|
|
%package devel
|
|
|
|
|
Summary: ARM Compute Library -- devel
|
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
Requires: libarm_compute%{so_ver} = %{version}
|
2022-12-23 13:15:17 +08:00
|
|
|
Requires: libarm_compute_core%{so_ver} = %{version}
|
|
|
|
|
Requires: libarm_compute_graph%{so_ver} = %{version}
|
|
|
|
|
# stb headers are required
|
|
|
|
|
Requires: stb-devel
|
2022-12-15 15:36:23 +08:00
|
|
|
|
|
|
|
|
%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
|
2022-12-23 13:15:17 +08:00
|
|
|
%autosetup -p1 -n ComputeLibrary-%{version}
|
2022-12-15 15:36:23 +08:00
|
|
|
|
|
|
|
|
%build
|
2022-12-23 13:15:17 +08:00
|
|
|
scons os=linux \
|
|
|
|
|
build=native \
|
|
|
|
|
install_dir=install \
|
2022-12-15 15:36:23 +08:00
|
|
|
set_soname=1 \
|
|
|
|
|
examples=1 \
|
|
|
|
|
opencl=1 \
|
|
|
|
|
%if %{with computelibrary_tests}
|
|
|
|
|
validation_tests=1 \
|
|
|
|
|
%else
|
|
|
|
|
validation_tests=0 \
|
|
|
|
|
%endif
|
2022-12-23 13:15:17 +08:00
|
|
|
%ifarch aarch64 aarch64_ilp32
|
2022-12-15 15:36:23 +08:00
|
|
|
neon=1 arch=arm64-v8a \
|
|
|
|
|
%endif
|
2022-12-23 13:15:17 +08:00
|
|
|
%ifarch armv7l armv7hl
|
|
|
|
|
neon=0 arch=armv7a \
|
|
|
|
|
%endif
|
2022-12-15 15:36:23 +08:00
|
|
|
%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}/
|
2022-12-23 13:15:17 +08:00
|
|
|
# FIXME: scons should install headers thanks to: install_dir=%%{buildroot}%%{_prefix} but this is broken
|
2022-12-15 15:36:23 +08:00
|
|
|
mkdir -p %{buildroot}%{_includedir}/
|
2022-12-23 13:15:17 +08:00
|
|
|
cp -a arm_compute/ support/ utils/ include/half/ include/libnpy/ %{buildroot}%{_includedir}/
|
2022-12-15 15:36:23 +08:00
|
|
|
# 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}
|
2022-12-23 13:15:17 +08:00
|
|
|
rm -f %{buildroot}%{_bindir}/*.h
|
2022-12-15 15:36:23 +08:00
|
|
|
# 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
|
|
|
|
|
|
2022-12-23 13:15:17 +08:00
|
|
|
%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
|
|
|
|
|
|
2022-12-15 15:36:23 +08:00
|
|
|
%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
|
2022-12-23 13:15:17 +08:00
|
|
|
%{_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}*
|
2022-12-15 15:36:23 +08:00
|
|
|
|
|
|
|
|
%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
|
2022-12-23 13:15:17 +08:00
|
|
|
* Mon Nov 28 2022 Guillaume GARDET <guillaume.gardet@opensuse.org>
|
|
|
|
|
- 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 <guillaume.gardet@opensuse.org>
|
|
|
|
|
- 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 <guillaume.gardet@opensuse.org>
|
|
|
|
|
- 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 <guillaume.gardet@opensuse.org>
|
|
|
|
|
- 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 <guillaume.gardet@opensuse.org>
|
|
|
|
|
- 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 <guillaume.gardet@opensuse.org>
|
|
|
|
|
- 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 <guillaume.gardet@opensuse.org>
|
|
|
|
|
- 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 <guillaume.gardet@opensuse.org>
|
|
|
|
|
- Add patch to fix build of ArmNN with openCL:
|
|
|
|
|
* acl-fix-packaging-issue.patch
|
|
|
|
|
* Wed Apr 7 2021 Guillaume GARDET <guillaume.gardet@opensuse.org>
|
|
|
|
|
- Package separately libarm_compute_core and libarm_compute_graph
|
|
|
|
|
* Mon Mar 29 2021 Guillaume GARDET <guillaume.gardet@opensuse.org>
|
|
|
|
|
- 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 <guillaume.gardet@opensuse.org>
|
|
|
|
|
- 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 <guillaume.gardet@opensuse.org>
|
|
|
|
|
- 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 <guillaume.gardet@opensuse.org>
|
|
|
|
|
- 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 <guillaume.gardet@opensuse.org>
|
|
|
|
|
- Update to 20.02.1 (no upstream changelog)
|
|
|
|
|
* Tue Feb 25 2020 Tomáš Chvátal <tchvatal@suse.com>
|
|
|
|
|
- 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 <tchvatal@suse.com>
|
|
|
|
|
- Cleanup a bit with spec-cleaner
|
|
|
|
|
* Fri Dec 6 2019 Guillaume GARDET <guillaume.gardet@opensuse.org>
|
|
|
|
|
- Update to 19.11 (no upstream changelog)
|
|
|
|
|
- Revert previous commit to disable neon on armv7
|
|
|
|
|
* Tue Nov 26 2019 Guillaume GARDET <guillaume.gardet@opensuse.org>
|
|
|
|
|
- Enable neon on armv7
|
|
|
|
|
* Wed Oct 9 2019 Guillaume GARDET <guillaume.gardet@opensuse.org>
|
|
|
|
|
- Fix Python scripts interpreter
|
|
|
|
|
- Fix -devel package dep
|
|
|
|
|
- Drop gcc 4.8 workaround
|
|
|
|
|
* Thu Sep 5 2019 Guillaume GARDET <guillaume.gardet@opensuse.org>
|
|
|
|
|
- Update to 19.08 (no upstream changelog)
|
|
|
|
|
* Mon Jun 3 2019 Guillaume GARDET <guillaume.gardet@opensuse.org>
|
|
|
|
|
- Add validation test option (disabled by default since CL is
|
|
|
|
|
unusable inside OBS)
|
|
|
|
|
* Mon Jun 3 2019 Guillaume GARDET <guillaume.gardet@opensuse.org>
|
|
|
|
|
- Update to 19.05 (no upstream changelog)
|
|
|
|
|
- Remove upstream patch:
|
|
|
|
|
* computelibrary-fix_opencl.patch
|
|
|
|
|
* Fri Apr 19 2019 Guillaume GARDET <guillaume.gardet@opensuse.org>
|
|
|
|
|
- Package scripts
|
|
|
|
|
* Thu Apr 11 2019 Guillaume GARDET <guillaume.gardet@opensuse.org>
|
|
|
|
|
- Add patch to fix build with openCL:
|
|
|
|
|
* computelibrary-fix_opencl.patch
|
|
|
|
|
* Wed Apr 3 2019 Guillaume GARDET <guillaume.gardet@opensuse.org>
|
|
|
|
|
- Update to 19.02
|
|
|
|
|
* Mon Jan 14 2019 Guillaume GARDET <guillaume.gardet@opensuse.org>
|
|
|
|
|
- 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
|