diff --git a/fix-clang.patch b/fix-clang.patch new file mode 100644 index 0000000000000000000000000000000000000000..b3f82493424fc73160486cd1acfa496d6604368f --- /dev/null +++ b/fix-clang.patch @@ -0,0 +1,14 @@ +diff -u -r oneDNN-2.6/cmake/OpenMP.cmake oneDNN-2.6/cmake/OpenMP.cmake +--- oneDNN-2.6/cmake/OpenMP.cmake 2022-03-30 04:26:28.000000000 +0800 ++++ oneDNN-2.6/cmake/OpenMP.cmake 2023-06-29 10:47:55.000000000 +0800 +@@ -23,8 +23,8 @@ + set(OpenMP_cmake_included true) + include("cmake/Threading.cmake") + +-if (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +- # OSX Clang doesn't have OpenMP by default. ++if ((APPLE OR UNIX) AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang") ++ # OSX, UNIX Clang doesn't have OpenMP by default. + # But we still want to build the library. + set(_omp_severity "WARNING") + else() diff --git a/onednn.spec b/onednn.spec index d2473a2079cb042e9724a296b5befec3eb8768ed..5ffc9947cff6f1e9bdd08abf48c56e6ba571a99d 100644 --- a/onednn.spec +++ b/onednn.spec @@ -2,12 +2,13 @@ Name: onednn Version: 2.6 -Release: 1 +Release: 2 Summary: Deep Neural Network Library License: ASL 2.0 and BSD and Boost and MIT URL: https://github.com/oneapi-src/oneDNN/ Source0: %{url}/archive/v%{version}/onednn-%{version}.tar.gz +Patch0: fix-clang.patch # This package only work in 64bit arches for now @@ -89,6 +90,8 @@ rm -rf %{buildroot}%{_docdir}/dnnl %{_libdir}/cmake/dnnl/*.cmake %changelog +* Thu Jun 29 2023 yoo - 2.6-2 +- fix clang build error: omp * Sat Aug 6 2022 wisespreading - 2.6-1 - Update to 2.6 for AMX * Wed Dec 22 2021 baihuawei - 2.2-3