## START: Set by rpmautospec ## (rpmautospec version 0.8.4) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %ifarch x86_64 %global toolchain clang %global _lto_cflags %{nil} %if 0%{?fedora} >= 45 %global omp_devel libomp22-devel %global omp_libdir %{_libdir}/llvm22/lib64 %else %global omp_devel libomp-devel %global omp_libdir %{_libdir} %endif %endif Name: onednn Version: 3.14 Release: %autorelease Summary: The oneAPI Deep Neural Network Library License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSL-1.0 AND MIT URL: https://github.com/uxlfoundation/oneDNN Source0: %{url}/archive/v%{version}/onednn-%{version}.tar.gz Source1: onednn-test.in # This package only work in 64bit arches for now ExclusiveArch: x86_64 aarch64 ppc64le s390x BuildRequires: make BuildRequires: cmake BuildRequires: doxygen BuildRequires: gcc-c++ BuildRequires: chrpath %ifarch x86_64 BuildRequires: intel-dpcpp BuildRequires: intel-dpcpp-devel BuildRequires: %{omp_devel} BuildRequires: oneapi-level-zero-devel BuildRequires: intel-level-zero-devel BuildRequires: intel-metrics-discovery-devel %else BuildRequires: pkgconfig(OpenCL) %endif # Virtual provides mkldnn Provides: mkldnn = %{version}-%{release} Provides: mkl-dnn = %{version}-%{release} Obsoletes: mkl-dnn < 1.3 # Provides oneDNN Provides: oneDNN = %{version}-%{release} %ifarch aarch64 Provides: bundled(kleidiai) %endif %ifarch x86_64 Requires: intel-dpcpp-runtime %endif %description oneAPI Deep Neural Network Library (oneDNN) is an open-source cross-platform performance library of basic building blocks for deep learning applications. oneDNN is part of oneAPI. The library is optimized for Intel(R) Architecture Processors, Intel Graphics, and Arm* 64-bit Architecture (AArch64)-based processors. oneDNN has experimental support for the following architectures: NVIDIA* GPU, OpenPOWER* Power ISA (PPC64), IBMz* (s390x), and RISC-V. oneDNN is intended for deep learning applications and framework developers interested in improving application performance on Intel CPUs and GPUs. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %ifarch x86_64 Requires: intel-dpcpp-devel Requires: oneapi-level-zero-devel Requires: opencl-headers %endif %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %package benchdnn Summary: benchdnn benchmark and test tool for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description benchdnn benchdnn is a standalone correctness and performance benchmark for oneDNN primitives. This package allows testing oneDNN functionality on target hardware without requiring the full build environment. %package tests Summary: unit tests for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description tests googletest-based unit tests for oneDNN. useful for validating oneDNN functionality on target hardware. %prep %autosetup -p1 -n oneDNN-%{version} %build %ifarch x86_64 export CFLAGS="$CFLAGS -idirafter %{_prefix}/lib/clang/22/include" export CXXFLAGS="$CXXFLAGS -idirafter %{_prefix}/lib/clang/22/include" export LDFLAGS="$LDFLAGS -L%{omp_libdir}" %endif %cmake \ -DDNNL_ARCH_OPT_FLAGS="" \ -DDNNL_BUILD_EXAMPLES=OFF \ -DDNNL_BUILD_TESTS=ON \ %ifarch x86_64 -DCMAKE_C_COMPILER=%{_bindir}/dpclang \ -DCMAKE_CXX_COMPILER=%{_bindir}/dpclang++ \ -DONEDNN_CPU_RUNTIME=OMP \ -DONEDNN_GPU_RUNTIME=SYCL \ -DONEDNN_OCL_INCLUDE_DIR=%{_includedir} \ -DONEDNN_ZE_INCLUDE_DIR=%{_includedir} %else -DONEDNN_GPU_RUNTIME=OCL %endif %cmake_build %install %cmake_install # Remove docs rm -rf %{buildroot}%{_docdir}/dnnl rm -rf %{buildroot}%{_includedir}/KleidiAIOps %{buildroot}%{_libdir}/cmake/KleidiAIOps %{buildroot}%{_libdir}/libkleidiai_ops.a # install benchdnn install -d %{buildroot}%{_libexecdir}/onednn install -pm0755 %{_vpath_builddir}/tests/benchdnn/benchdnn %{buildroot}%{_libexecdir}/onednn/ chrpath -d %{buildroot}%{_libexecdir}/onednn/benchdnn cp -a %{_vpath_builddir}/tests/benchdnn/inputs %{buildroot}%{_libexecdir}/onednn/ # wrapper script for benchdnn install -d %{buildroot}%{_bindir} cat > %{buildroot}%{_bindir}/benchdnn << 'EOF' #!/bin/sh exec %{_libexecdir}/onednn/benchdnn "$@" EOF chmod 0755 %{buildroot}%{_bindir}/benchdnn # install gtests install -d %{buildroot}%{_libexecdir}/onednn/gtests find %{_vpath_builddir}/tests/gtests -maxdepth 1 -type f -executable -name 'test_*' \ -exec install -pm0755 {} %{buildroot}%{_libexecdir}/onednn/gtests/ \; [ -f %{_vpath_builddir}/tests/api-c ] && \ install -pm0755 %{_vpath_builddir}/tests/api-c %{buildroot}%{_libexecdir}/onednn/gtests/ || true [ -f %{_vpath_builddir}/tests/test_c_symbols-c ] && \ install -pm0755 %{_vpath_builddir}/tests/test_c_symbols-c %{buildroot}%{_libexecdir}/onednn/gtests/ || true # strip build-tree RUNPATH from test binaries find %{buildroot}%{_libexecdir}/onednn/gtests -type f -executable \ -exec chrpath -d {} \; 2>/dev/null || true # test runner script sed -e 's|@LIBEXECDIR@|%{_libexecdir}|g' \ %{SOURCE1} > %{buildroot}%{_bindir}/onednn-test chmod 0755 %{buildroot}%{_bindir}/onednn-test # Some ocl/gpu tests will fails if lacking an appropriate implementation %check %ifarch x86_64 %ctest -E "benchdnn|gpu|test_api_sycl" %else %{?_with_tests: %ctest } %endif %files %license LICENSE THIRD-PARTY-PROGRAMS %doc README.md CONTRIBUTING.md CODE_OF_CONDUCT.md %{_libdir}/libdnnl.so.3 %{_libdir}/libdnnl.so.3.* %files devel %dir %{_includedir}/oneapi %{_includedir}/oneapi/dnnl %{_includedir}/dnnl*.h* %{_libdir}/libdnnl.so %dir %{_libdir}/cmake/dnnl %{_libdir}/cmake/dnnl/*.cmake %files benchdnn %{_bindir}/benchdnn %{_libexecdir}/onednn/benchdnn %{_libexecdir}/onednn/inputs/ %files tests %{_bindir}/onednn-test %{_libexecdir}/onednn/gtests/ %changelog ## START: Generated by rpmautospec * Fri Oct 23 2026 Pavel Androniychuk - 3.14-2 - Fix aarch64 build * Fri Oct 23 2026 Pavel Androniychuk - 3.14-1 - New release v3.14 * Thu Oct 22 2026 Pavel Androniychuk - 3.13.4-2 - Add XPU support to existing pkgs * Tue Oct 06 2026 Nicolas Chauvet - 3.13.4-1 - Update to 3.13.4 * Thu Oct 01 2026 Nicolas Chauvet - 3.13.3-1 - Update to 3.13.3 * Wed Sep 23 2026 Adam Jackson - 3.13.2-2 - Build and package benchdnn and the tests * Thu Aug 27 2026 Nicolas Chauvet - 3.13.2-1 - Update to 3.13.2 * Thu Aug 20 2026 Nicolas Chauvet - 3.13.1-1 - Update to 3.13.1 * Wed Jul 22 2026 Nicolas Chauvet - 3.13-1 - Update to 3.13 * Thu Jul 16 2026 Nicolas Chauvet - 3.12.3-1 - Update to 3.12.3 * Thu Jul 02 2026 Nicolas Chauvet - 3.12.2-1 - Update to 3.12.2 * Sat Jun 06 2026 Nicolas Chauvet - 3.12.1-1 - Update to 3.12.1 * Sat May 16 2026 Nicolas Chauvet - 3.12-1 - Update to 3.12 * Sat Apr 18 2026 Nicolas Chauvet - 3.11.3-1 - Update to 3.11.3 * Mon Mar 30 2026 Nicolas Chauvet - 3.11.2-1 - Update to 3.11.2 * Tue Mar 17 2026 Nicolas Chauvet - 3.11.1-1 - Update to 3.11.1 * Sat Feb 07 2026 Nicolas Chauvet - 3.11-2 - Update source * Sat Feb 07 2026 Nicolas Chauvet - 3.11-1 - Update to 3.11 * Fri Jan 16 2026 Fedora Release Engineering - 3.10.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild * Mon Dec 08 2025 Nicolas Chauvet - 3.10.2-2 - Add sources * Mon Dec 08 2025 Nicolas Chauvet - 3.10.2-1 - Update to 3.10.2 * Fri Nov 21 2025 Nicolas Chauvet - 3.10.1-2 - Add patch to fix s390x build - rhbz#2416316 * Fri Nov 21 2025 Nicolas Chauvet - 3.10.1-1 - Update to 3.10.1 * Sun Nov 09 2025 Nicolas Chauvet - 3.10-2 - Drop merged patch * Sun Nov 09 2025 Nicolas Chauvet - 3.10-1 - Update to 3.10 * Thu Oct 16 2025 Nicolas Chauvet - 3.9.2-1 - Update to 3.9.2 * Tue Sep 16 2025 Adam Jackson - 3.9.1-3 - Work around ppc64le build failure * Tue Sep 16 2025 Nicolas Chauvet - 3.9.1-2 - Indent and Capitalize summary * Sat Aug 30 2025 Nicolas Chauvet - 3.9.1-1 - Update to 3.9.1 * Mon Aug 25 2025 Nicolas Chauvet - 3.9-1 - Update to 3.9 * Thu Jul 24 2025 Fedora Release Engineering - 3.8.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Wed May 28 2025 Nicolas Chauvet - 3.8.1-1 - Update to 3.8.1 * Thu May 15 2025 Nicolas Chauvet - 3.8-1 - Update to 3.8 * Fri Mar 21 2025 Nicolas Chauvet - 3.7.2-1 - Update to 3.7.2 * Fri Jan 17 2025 Fedora Release Engineering - 3.6.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild * Mon Dec 09 2024 Ali Erdinc Koroglu - 3.6.2-1 - Update to 3.6.2 (rhbz#2330753) * Wed Nov 06 2024 Ali Erdinc Koroglu - 3.6.1-1 - Update to 3.6.1 (rhbz#2314033) * Mon Oct 21 2024 Adam Jackson - 3.5.3-5 - Fix OpenCL build on ppc64le * Wed Sep 18 2024 Ali Erdinc Koroglu - 3.5.3-4 - disable GPU support for ppc64le * Wed Sep 18 2024 Ali Erdinc Koroglu - 3.5.3-3 - typo fix * Wed Sep 18 2024 Ali Erdinc Koroglu - 3.5.3-2 - enable OpenCL graph compiler backend for GPU support * Fri Aug 16 2024 Nicolas Chauvet - 3.5.3-1 - Update to 3.5.3 * Sun Jul 28 2024 Nicolas Chauvet - 3.5.2-1 - Update to 3.5.2 * Thu Jul 18 2024 Fedora Release Engineering - 3.5.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Tue Jul 16 2024 Nicolas Chauvet - 3.5.1-1 - Update to 3.5.1 * Thu Jul 04 2024 Nicolas Chauvet - 3.4.3-2 - Update sources * Thu Jul 04 2024 Nicolas Chauvet - 3.4.3-1 - Update to 3.4.3 * Fri May 31 2024 Nicolas Chauvet - 3.4.2-5 - Add fix for s390x * Fri May 31 2024 Nicolas Chauvet - 3.4.2-4 - Add Fix for s390x * Fri May 24 2024 Nicolas Chauvet - 3.4.2-1 - Update to 3.4.2 * Fri Apr 19 2024 Nicolas Chauvet - 3.3.6-1 - Update to 3.3.6 * Wed Feb 07 2024 Nicolas Chauvet - 3.3.4-1 - Update to 3.3.4 * Thu Jan 25 2024 Fedora Release Engineering - 3.3.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Jan 21 2024 Fedora Release Engineering - 3.3.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Wed Dec 20 2023 Nicolas Chauvet - 3.3.3-1 - Update to 3.3.3 * Sat Dec 02 2023 Nicolas Chauvet - 3.3.2-1 - Update to 3.3.2 * Fri Oct 13 2023 Nicolas Chauvet - 3.3-1 - Update to 3.3 * Mon Sep 04 2023 Nicolas Chauvet - 3.2.1-1 - Update to 3.2.1 * Thu Jul 20 2023 Fedora Release Engineering - 3.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Mon Jun 26 2023 Nicolas Chauvet - 3.2-1 - Update to 3.2 * Mon Jun 12 2023 Nicolas Chauvet - 3.1.1-1 - Update to 3.1.1 * Thu May 04 2023 Nicolas Chauvet - 3.1-1 - Update to 3.1 * Mon Mar 06 2023 Ali Erdinc Koroglu - 3.0.1-2 - oneDNN did not migrate the latest fujitsu/xbyak_aarch64 yet * Mon Mar 06 2023 Ali Erdinc Koroglu - 3.0.1-1 - Update to 3.0.1 * Sat Feb 11 2023 Ali Erdinc Koroglu - 3.0-1 - Update to 3.0 * Thu Jan 19 2023 Fedora Release Engineering - 2.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Wed Sep 28 2022 Nicolas Chauvet - 2.7-1 - Update to 2.7 * Wed Aug 10 2022 Nicolas Chauvet - 2.6.1-1 - Update to 2.6.1 * Fri Jul 22 2022 Fedora Release Engineering - 2.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue Jun 14 2022 Nicolas Chauvet - 2.6-1 - Update to 2.6 - Drop previous compat libraries * Thu Jan 20 2022 Fedora Release Engineering - 2.4.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Mon Dec 06 2021 Nicolas Chauvet - 2.4.4-1 - Update to 2.4.4 * Fri Oct 08 2021 Nicolas Chauvet - 2.4-1 - Update to 2.4 * Mon Aug 16 2021 Nicolas Chauvet - 2.3.2-2 - Enable s390x - Enable ctest - Fix compilation issue on non-x86 arches * Mon Aug 16 2021 Nicolas Chauvet - 2.3.2-1 - Update to 2.3.2 * Thu Jul 22 2021 Fedora Release Engineering - 2.2.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Wed May 26 2021 Nicolas Chauvet - 2.2.2-1 - Update to 2.2.2 * Sat Apr 03 2021 Nicolas Chauvet - 2.2-1 - Update to 2.2 * Tue Mar 30 2021 Jonathan Wakely - 2.1-2 - Rebuilt for removed libstdc++ symbol (#1937698) * Wed Feb 17 2021 Nicolas Chauvet - 2.1-1 - Update to 2.1 * Tue Jan 26 2021 Fedora Release Engineering - 1.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Mon Aug 03 2020 Nicolas Chauvet - 1.6-1 - Update to 1.6 * Sat Aug 01 2020 Fedora Release Engineering - 1.5-3 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue Jul 28 2020 Fedora Release Engineering - 1.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue Jun 23 2020 Nicolas Chauvet - 1.5-1 - Update to 1.5 - Enable aarch64 * Mon Apr 20 2020 Nicolas Chauvet - 1.4-1 - Update to 1.4 * Sat Apr 04 2020 Nicolas Chauvet - 1.3-1 - Update to 1.3 - Switch to onednn * Sat Apr 6 2019 Nicolas Chauvet - 0.18.1-1 - Initial spec file. ## END: Generated by rpmautospec