public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Nicolas Chauvet <kwizart@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/onednn] xpu-support-single-build: Fix compilation
Date: Mon, 19 Oct 2026 21:40:30 GMT	[thread overview]
Message-ID: <179244603016.1.6387051581906386823.rpms-onednn-2e15f1a03a03@fedoraproject.org> (raw)

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
 

                 reply	other threads:[~2026-10-19 21:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179244603016.1.6387051581906386823.rpms-onednn-2e15f1a03a03@fedoraproject.org \
    --to=kwizart@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox