public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/onednn] xpu-support-single-build: Fix compilation
@ 2026-10-19 21:40 Nicolas Chauvet
0 siblings, 0 replies; only message in thread
From: Nicolas Chauvet @ 2026-10-19 21:40 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/onednn
Branch : xpu-support-single-build
Commit : 2e15f1a03a0325f53e7f3c683657b42585acd453
Author : Nicolas Chauvet <kwizart@gmail.com>
Date : 2021-08-17T10:39:51+02:00
Stats : +53/-11 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/onednn/c/2e15f1a03a0325f53e7f3c683657b42585acd453?branch=xpu-support-single-build
Log:
Fix compilation
---
diff --git a/0001-Add-thread-for-gcc-11.patch b/0001-Add-thread-for-gcc-11.patch
index 7937b8a..9dc9fd5 100644
--- a/0001-Add-thread-for-gcc-11.patch
+++ b/0001-Add-thread-for-gcc-11.patch
@@ -1,7 +1,7 @@
-From aa28ef05177375856d0a42960af1e41addc258f6 Mon Sep 17 00:00:00 2001
+From c3b239d62d6853e0f4343c43ada31b201788f683 Mon Sep 17 00:00:00 2001
From: Nicolas Chauvet <kwizart@gmail.com>
Date: Sat, 3 Apr 2021 13:55:28 +0200
-Subject: [PATCH] Add thread for gcc-11
+Subject: [PATCH 1/2] Add thread for gcc-11
Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
---
@@ -9,17 +9,17 @@ Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
1 file changed, 1 insertion(+)
diff --git a/src/common/primitive_cache.cpp b/src/common/primitive_cache.cpp
-index d388a7ba0ba6..d090e338922a 100644
+index 3df1a6370eed..f33950ce0098 100644
--- a/src/common/primitive_cache.cpp
+++ b/src/common/primitive_cache.cpp
-@@ -24,6 +24,7 @@
- #include "cpu/platform.hpp"
+@@ -28,6 +28,7 @@
+ #endif
#include <algorithm>
+#include <thread>
#include <unordered_map>
- namespace dnnl {
+ #ifdef _WIN32
--
-2.30.2
+2.31.1
diff --git a/0002-Use-__INTEL_COMPILER-guard.patch b/0002-Use-__INTEL_COMPILER-guard.patch
new file mode 100644
index 0000000..7682c58
--- /dev/null
+++ b/0002-Use-__INTEL_COMPILER-guard.patch
@@ -0,0 +1,29 @@
+From 2654b133917480ff6860c4c8b4b9df11c9c95bf5 Mon Sep 17 00:00:00 2001
+From: Nicolas Chauvet <kwizart@gmail.com>
+Date: Tue, 17 Aug 2021 09:36:19 +0200
+Subject: [PATCH 2/2] Use __INTEL_COMPILER guard
+
+This fixes compilation on non-x86 arches
+
+Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
+---
+ src/gpu/jit/ngen/ngen_utils.hpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/gpu/jit/ngen/ngen_utils.hpp b/src/gpu/jit/ngen/ngen_utils.hpp
+index 508756a080fd..2b736927db35 100644
+--- a/src/gpu/jit/ngen/ngen_utils.hpp
++++ b/src/gpu/jit/ngen/ngen_utils.hpp
+@@ -19,7 +19,9 @@
+
+ #include <cstdint>
+
++#ifdef __INTEL_COMPILER
+ #include <immintrin.h>
++#endif
+
+ #ifdef _MSC_VER
+ #include <intrin.h>
+--
+2.31.1
+
diff --git a/onednn.spec b/onednn.spec
index 9144296..e4d67d3 100644
--- a/onednn.spec
+++ b/onednn.spec
@@ -2,7 +2,7 @@
Name: onednn
Version: 2.3.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Deep Neural Network Library
License: ASL 2.0 and BSD and Boost and MIT
@@ -10,11 +10,12 @@ URL: https://github.com/oneapi-src/oneDNN/
Source0: %{url}/archive/v%{version}/onednn-%{version}.tar.gz
# Fuzz is need to apply upstream patch
Patch0: 0001-Add-thread-for-gcc-11.patch
+Patch1: 0002-Use-__INTEL_COMPILER-guard.patch
-# This package only work in few arches for now
-ExclusiveArch: x86_64 aarch64 ppc64le
+# This package only work in 64bit arches for now
+ExclusiveArch: x86_64 aarch64 ppc64le s390x
-BuildRequires: make
+BuildRequires: make
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: gcc-c++
@@ -73,6 +74,13 @@ rm -rf %{buildroot}%{_docdir}/dnnl
%ldconfig_scriptlets
+# Some ocl/gpu tests will fails if lacking an appropriate implementation
+%{?_with_tests:
+%check
+%ctest
+}
+
+
%files
%license LICENSE THIRD-PARTY-PROGRAMS
%doc README.md CONTRIBUTING.md CODE_OF_CONDUCT.md
@@ -95,6 +103,11 @@ rm -rf %{buildroot}%{_docdir}/dnnl
%changelog
+* Mon Aug 16 2021 Nicolas Chauvet <kwizart@gmail.com> - 2.3.2-2
+- Enable s390x
+- Enable ctest
+- Fix compilation issue on non-x86 arches
+
* Mon Aug 16 2021 Nicolas Chauvet <kwizart@gmail.com> - 2.3.2-1
- Update to 2.3.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-19 21:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-19 21:40 [rpms/onednn] xpu-support-single-build: Fix compilation Nicolas Chauvet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox