Name: libarmcl Version: v20.05 Release: 1 License: MIT Url: https://github.com/ARM-software/ComputeLibrary Summary: The ARM Computer Vision and Machine Learning library Group: Graphics & UI Framework/Libraries Source0: %{name}-%{version}.tar.bz2 Source1001: %{name}.manifest ExclusiveArch: %{arm} aarch64 BuildRequires: python3-base BuildRequires: python BuildRequires: scons %define OPEN_CL_SUPPORT 1 %define NEON_SUPPORT 1 %define BENCHMARK_TEST 1 %description The ARM Computer Vision and Machine Learning library is a set of functions optimised for both ARM CPUs and GPUs using SIMD technologies %package devel Summary: Userspace interface to ARM Compute Library Requires: %{name} = %{version}-%{release} %description devel Summary: Userspace interface to ARM Compute Library %package tools Summary: Sample application and benchmark binaries to test ARM Compute Library Requires: %{name} = %{version}-%{release} %description tools Summary: Sample application and benchmark binaries to test ARM Compute Library %prep %setup -q cp %{SOURCE1001} . %build echo %{_builddir} # Ps. Tizen toolchain doesn't have generic name of ar and ranlib so # 'build=native' is needed not to attach Tizen toolchain prefix # but to use native 'ar' and 'ranlib' without any prefix. scons -j8 \ Werror=0 \ debug=0 \ %if 0%{?NEON_SUPPORT} == 1 neon=1 \ %endif # NEON_SUPPORT %if 0%{?OPEN_CL_SUPPORT} == 1 opencl=1 \ %endif # OPEN_CL_SUPPORT os=tizen \ build=native \ %ifarch aarch64 arch=arm64-v8.2-a \ %else arch=armv7a \ %endif embed_kernels=1 \ %if 0%{?BENCHMARK_TEST} == 1 benchmark_tests=1 %endif %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %install mkdir -p %{buildroot}%{_libdir} mkdir -p %{buildroot}%{_libdir}/data mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}/usr/include/arm_compute mkdir -p %{buildroot}/usr/include/arm_compute/src/core/NEON/kernels/arm_gemm mkdir -p %{buildroot}/usr/include/support mkdir -p %{buildroot}/usr/include/CL mkdir -p %{buildroot}/usr/include/half mkdir -p %{buildroot}/usr/include/libnpy install -m 644 build/libarm_compute_core.so %{buildroot}%{_libdir} install -m 644 build/libarm_compute.so %{buildroot}%{_libdir} install -m 644 build/libarm_compute_graph.so %{buildroot}%{_libdir} %if 0%{?OPEN_CL_SUPPORT} == 1 install -m 644 build/examples/cl_convolution %{buildroot}%{_bindir} install -m 644 build/examples/cl_events %{buildroot}%{_bindir} install -m 644 build/examples/cl_sgemm %{buildroot}%{_bindir} %endif # OPEN_CL_SUPPORT install -m 644 build/examples/graph_alexnet %{buildroot}%{_bindir} install -m 644 build/examples/graph_googlenet %{buildroot}%{_bindir} install -m 644 build/examples/graph_inception_v3 %{buildroot}%{_bindir} install -m 644 build/examples/graph_inception_v4 %{buildroot}%{_bindir} install -m 644 build/examples/graph_lenet %{buildroot}%{_bindir} install -m 644 build/examples/graph_mobilenet %{buildroot}%{_bindir} install -m 644 build/examples/graph_resnet50 %{buildroot}%{_bindir} install -m 644 build/examples/graph_resnext50 %{buildroot}%{_bindir} install -m 644 build/examples/graph_squeezenet %{buildroot}%{_bindir} install -m 644 build/examples/graph_squeezenet_v1_1 %{buildroot}%{_bindir} install -m 644 build/examples/graph_vgg16 %{buildroot}%{_bindir} install -m 644 build/examples/graph_vgg19 %{buildroot}%{_bindir} %if 0%{?NEON_SUPPORT} == 1 install -m 644 build/examples/neon_cartoon_effect %{buildroot}%{_bindir} %if 0%{?OPEN_CL_SUPPORT} == 1 install -m 644 build/examples/neoncl_scale_median_gaussian %{buildroot}%{_bindir} %endif # OPEN_CL_SUPPORT install -m 644 build/examples/neon_cnn %{buildroot}%{_bindir} install -m 644 build/examples/neon_convolution %{buildroot}%{_bindir} install -m 644 build/examples/neon_copy_objects %{buildroot}%{_bindir} install -m 644 build/examples/neon_scale %{buildroot}%{_bindir} %endif # NEON_SUPPORT cp -r %{_builddir}/%{name}-%{version}/arm_compute/* %{buildroot}/usr/include/arm_compute/ cp -r %{_builddir}/%{name}-%{version}/src/core/NEON/kernels/arm_gemm/* %{buildroot}/usr/include/arm_compute/src/core/NEON/kernels/arm_gemm/ cp -r %{_builddir}/%{name}-%{version}/support/* %{buildroot}/usr/include/support/ cp -r %{_builddir}/%{name}-%{version}/include/CL/* %{buildroot}/usr/include/CL/ cp -r %{_builddir}/%{name}-%{version}/include/half/* %{buildroot}/usr/include/half/ cp -r %{_builddir}/%{name}-%{version}/include/libnpy/* %{buildroot}/usr/include/libnpy/ %if 0%{?BENCHMARK_TEST} == 1 install -m 644 %{_builddir}/%{name}-%{version}/build/tests/arm_compute_benchmark %{buildroot}%{_bindir} cp -r %{_builddir}/%{name}-%{version}/data/* %{buildroot}%{_libdir}/data/ %endif %files %manifest %{name}.manifest %{_libdir}/libarm_compute*.so %files devel %manifest %{name}.manifest %{_includedir}/arm_compute/* %{_includedir}/support/* %{_includedir}/CL/* %{_includedir}/half/* %{_includedir}/libnpy/* %files tools %manifest %{name}.manifest %if 0%{?OPEN_CL_SUPPORT} == 1 %{_bindir}/cl_convolution %{_bindir}/cl_events %{_bindir}/cl_sgemm %endif # OPEN_CL_SUPPORT %{_bindir}/graph_alexnet %{_bindir}/graph_googlenet %{_bindir}/graph_inception_v3 %{_bindir}/graph_inception_v4 %{_bindir}/graph_lenet %{_bindir}/graph_mobilenet %{_bindir}/graph_resnet50 %{_bindir}/graph_resnext50 %{_bindir}/graph_squeezenet %{_bindir}/graph_squeezenet_v1_1 %{_bindir}/graph_vgg16 %{_bindir}/graph_vgg19 %if 0%{?NEON_SUPPORT} == 1 %{_bindir}/neon_cartoon_effect %if 0%{?OPEN_CL_SUPPORT} == 1 %{_bindir}/neoncl_scale_median_gaussian %endif # OPEN_CL_SUPPORT %{_bindir}/neon_cnn %{_bindir}/neon_convolution %{_bindir}/neon_copy_objects %{_bindir}/neon_scale %endif # NEON_SUPPORT %if 0%{?BENCHMARK_TEST} == 1 %{_bindir}/arm_compute_benchmark %{_libdir}/data/* %endif