Update to 2.6 for AMX
Signed-off-by: Jincheng Miao <jincheng.miao@intel.com> (cherry picked from commit 9caa1d09c41c48a4a3622f750520a9267a629ad8)
This commit is contained in:
parent
a1cfc51f10
commit
a755901812
@ -1,63 +0,0 @@
|
|||||||
From bae5eda24f3d5e257a99bdffafc91d87e1e1278e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Pablo Romero <pablorcum@gmail.com>
|
|
||||||
Date: Sun, 3 Oct 2021 07:48:39 +0200
|
|
||||||
Subject: [PATCH 1/4] tests: fix build issues on QNX
|
|
||||||
|
|
||||||
This fixes #1164. Add required macros and libraries for QNX.
|
|
||||||
This fixes #1165. Set required libraries to link for QNX.
|
|
||||||
---
|
|
||||||
tests/benchdnn/CMakeLists.txt | 7 +++++--
|
|
||||||
tests/benchdnn/dnnl_common.cpp | 2 +-
|
|
||||||
tests/gtests/gtest/CMakeLists.txt | 4 +++-
|
|
||||||
3 files changed, 9 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/tests/benchdnn/CMakeLists.txt b/tests/benchdnn/CMakeLists.txt
|
|
||||||
index c4d7e00ee..4ff1bd281 100644
|
|
||||||
--- a/tests/benchdnn/CMakeLists.txt
|
|
||||||
+++ b/tests/benchdnn/CMakeLists.txt
|
|
||||||
@@ -35,10 +35,13 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
|
||||||
append_if(UNIX CMAKE_CXX_FLAGS "-prec-div -prec-sqrt -fp-model precise")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
-if(UNIX AND NOT APPLE)
|
|
||||||
+if(UNIX AND NOT APPLE AND NOT QNXNTO)
|
|
||||||
find_library(LIBRT rt)
|
|
||||||
+elseif(QNXNTO)
|
|
||||||
+ find_library(LIBREGEX regex)
|
|
||||||
+ find_library(LIBSOCKET socket)
|
|
||||||
endif()
|
|
||||||
-register_exe(benchdnn "${SOURCES}" "" "${LIBRT}")
|
|
||||||
+register_exe(benchdnn "${SOURCES}" "" "${LIBRT};${LIBREGEX};${LIBSOCKET}")
|
|
||||||
|
|
||||||
file(COPY inputs DESTINATION .)
|
|
||||||
|
|
||||||
diff --git a/tests/benchdnn/dnnl_common.cpp b/tests/benchdnn/dnnl_common.cpp
|
|
||||||
index 18af190e7..244583bd1 100644
|
|
||||||
--- a/tests/benchdnn/dnnl_common.cpp
|
|
||||||
+++ b/tests/benchdnn/dnnl_common.cpp
|
|
||||||
@@ -460,7 +460,7 @@ static size_t get_cpu_ram_size() {
|
|
||||||
GlobalMemoryStatusEx(&s);
|
|
||||||
return s.ullTotalPhys;
|
|
||||||
}
|
|
||||||
-#elif defined(__APPLE__) || defined(__FreeBSD__)
|
|
||||||
+#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__QNXNTO__)
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/sysctl.h>
|
|
||||||
|
|
||||||
diff --git a/tests/gtests/gtest/CMakeLists.txt b/tests/gtests/gtest/CMakeLists.txt
|
|
||||||
index eacac64f1..2fb7b4f4f 100644
|
|
||||||
--- a/tests/gtests/gtest/CMakeLists.txt
|
|
||||||
+++ b/tests/gtests/gtest/CMakeLists.txt
|
|
||||||
@@ -13,6 +13,8 @@ add_library(${TARGET_NAME} STATIC ${MAIN_SRC})
|
|
||||||
# In that case FindThreads module may skip adding any flags for pthread library
|
|
||||||
# because they are not needed for C compiler but this may led to issues with
|
|
||||||
# C++ compiler which is not checked.
|
|
||||||
-if(UNIX OR MINGW)
|
|
||||||
+if((UNIX AND NOT QNXNTO) OR MINGW)
|
|
||||||
target_link_libraries(${TARGET_NAME} pthread)
|
|
||||||
+elseif(QNXNTO)
|
|
||||||
+ target_link_libraries(${TARGET_NAME} regex)
|
|
||||||
endif()
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
From a66a10e8b9b11ee238a82058bb2bb895b018cb24 Mon Sep 17 00:00:00 2001
|
|
||||||
From: nSircombe <32057673+nSircombe@users.noreply.github.com>
|
|
||||||
Date: Fri, 9 Jul 2021 01:02:34 +0100
|
|
||||||
Subject: [PATCH 2/4] build: fix to include path for ArmPL builds. (#1111)
|
|
||||||
|
|
||||||
---
|
|
||||||
cmake/blas.cmake | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/cmake/blas.cmake b/cmake/blas.cmake
|
|
||||||
index 4a5712496..7dc113fd5 100644
|
|
||||||
--- a/cmake/blas.cmake
|
|
||||||
+++ b/cmake/blas.cmake
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
# *******************************************************************************
|
|
||||||
-# Copyright 2020 Arm Limited and affiliates.
|
|
||||||
+# Copyright 2020-2021 Arm Limited and affiliates.
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
@@ -51,6 +51,7 @@ if(DNNL_BLAS_VENDOR STREQUAL "MKL")
|
|
||||||
elseif(DNNL_BLAS_VENDOR STREQUAL "OPENBLAS")
|
|
||||||
set(BLA_VENDOR "OpenBLAS")
|
|
||||||
elseif(DNNL_BLAS_VENDOR STREQUAL "ARMPL")
|
|
||||||
+ set(CBLAS_HEADERS "armpl.h")
|
|
||||||
expect_arch_or_generic("AARCH64")
|
|
||||||
if(DNNL_CPU_RUNTIME STREQUAL "OMP")
|
|
||||||
set(BLA_VENDOR "Arm_mp")
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
From e2f932bbf0d06734461a3f344c9d6a5062723057 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Alexandre Truong <alexandre.truong@arm.com>
|
|
||||||
Date: Wed, 28 Apr 2021 10:32:35 +0100
|
|
||||||
Subject: [PATCH 3/4] cpu: aarch64: missing include for arm_compute::Scheduler
|
|
||||||
|
|
||||||
---
|
|
||||||
src/cpu/aarch64/acl_indirect_gemm_convolution.hpp | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/src/cpu/aarch64/acl_indirect_gemm_convolution.hpp b/src/cpu/aarch64/acl_indirect_gemm_convolution.hpp
|
|
||||||
index 86d2bed73..040311f8c 100644
|
|
||||||
--- a/src/cpu/aarch64/acl_indirect_gemm_convolution.hpp
|
|
||||||
+++ b/src/cpu/aarch64/acl_indirect_gemm_convolution.hpp
|
|
||||||
@@ -26,6 +26,7 @@
|
|
||||||
|
|
||||||
#include "arm_compute/runtime/FunctionDescriptors.h"
|
|
||||||
#include "arm_compute/runtime/NEON/NEFunctions.h"
|
|
||||||
+#include "arm_compute/runtime/Scheduler.h"
|
|
||||||
|
|
||||||
namespace dnnl {
|
|
||||||
namespace impl {
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
From 6067e2fd599b1133c0d7b404fe7a1ca0e04432b0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Isuru Fernando <isuruf@gmail.com>
|
|
||||||
Date: Mon, 8 Mar 2021 11:22:22 -0600
|
|
||||||
Subject: [PATCH 4/4] cpu: x64: amx: Remove errorneous use of UINT8_C
|
|
||||||
|
|
||||||
UINT8_C should only be used for converting an integer literal to uint8_t,
|
|
||||||
but 'no' is not an integer literal an is a uint8_t variable. If UINT8_C(v)
|
|
||||||
is defined as 'v ## U`, then this fails to compile
|
|
||||||
---
|
|
||||||
src/cpu/x64/jit_avx512_core_amx_conv_kernel.cpp | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/cpu/x64/jit_avx512_core_amx_conv_kernel.cpp b/src/cpu/x64/jit_avx512_core_amx_conv_kernel.cpp
|
|
||||||
index 00792f450..9cc71b2ad 100644
|
|
||||||
--- a/src/cpu/x64/jit_avx512_core_amx_conv_kernel.cpp
|
|
||||||
+++ b/src/cpu/x64/jit_avx512_core_amx_conv_kernel.cpp
|
|
||||||
@@ -480,7 +480,7 @@ void jit_avx512_core_amx_copy_to_wbuffer_t::generate() {
|
|
||||||
const uint8_t nr = is_bf16 ? 2 : 4; // 2r or 4r
|
|
||||||
for (uint8_t o = 0; o < no; ++o) {
|
|
||||||
for (uint8_t r = 0; r < nr; r++) {
|
|
||||||
- const uint8_t index = o + r * UINT8_C(no);
|
|
||||||
+ const uint8_t index = o + r * no;
|
|
||||||
if (is_bf16)
|
|
||||||
dw(index);
|
|
||||||
else
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
||||||
Binary file not shown.
BIN
onednn-2.6.tar.gz
Normal file
BIN
onednn-2.6.tar.gz
Normal file
Binary file not shown.
26
onednn.spec
26
onednn.spec
@ -1,21 +1,17 @@
|
|||||||
%global __cmake_in_source_build 1
|
%global __cmake_in_source_build 1
|
||||||
|
|
||||||
Name: onednn
|
Name: onednn
|
||||||
Version: 2.2
|
Version: 2.6
|
||||||
Release: 3
|
Release: 1
|
||||||
Summary: Deep Neural Network Library
|
Summary: Deep Neural Network Library
|
||||||
|
|
||||||
License: ASL 2.0 and BSD and Boost and MIT
|
License: ASL 2.0 and BSD and Boost and MIT
|
||||||
URL: https://github.com/oneapi-src/oneDNN/
|
URL: https://github.com/oneapi-src/oneDNN/
|
||||||
Source0: %{url}/archive/v%{version}/onednn-%{version}.tar.gz
|
Source0: %{url}/archive/v%{version}/onednn-%{version}.tar.gz
|
||||||
|
|
||||||
Patch0: 0001-tests-fix-build-issues-on-QNX.patch
|
|
||||||
Patch1: 0002-build-fix-to-include-path-for-ArmPL-builds.-1111.patch
|
|
||||||
Patch2: 0003-cpu-aarch64-missing-include-for-arm_compute-Schedule.patch
|
|
||||||
Patch3: 0004-cpu-x64-amx-Remove-errorneous-use-of-UINT8_C.patch
|
|
||||||
|
|
||||||
# This package only work in few arches for now
|
# This package only work in 64bit arches for now
|
||||||
ExclusiveArch: x86_64 aarch64 ppc64le
|
ExclusiveArch: x86_64 aarch64
|
||||||
|
|
||||||
BuildRequires: cmake doxygen gcc-c++
|
BuildRequires: cmake doxygen gcc-c++
|
||||||
|
|
||||||
@ -83,24 +79,18 @@ rm -rf %{buildroot}%{_docdir}/dnnl
|
|||||||
%doc README.md CONTRIBUTING.md CODE_OF_CONDUCT.md
|
%doc README.md CONTRIBUTING.md CODE_OF_CONDUCT.md
|
||||||
%{_libdir}/libdnnl.so.2
|
%{_libdir}/libdnnl.so.2
|
||||||
%{_libdir}/libdnnl.so.2.*
|
%{_libdir}/libdnnl.so.2.*
|
||||||
%{_libdir}/libmkldnn.so.2
|
|
||||||
%{_libdir}/libmkldnn.so.2.*
|
|
||||||
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%{_includedir}/mkldnn*.h*
|
%dir %{_includedir}/oneapi
|
||||||
|
%{_includedir}/oneapi/dnnl
|
||||||
%{_includedir}/dnnl*.h*
|
%{_includedir}/dnnl*.h*
|
||||||
%dir %{_includedir}/oneapi/dnnl
|
|
||||||
%{_includedir}/oneapi/dnnl/*
|
|
||||||
%{_libdir}/libdnnl.so
|
%{_libdir}/libdnnl.so
|
||||||
%{_libdir}/libmkldnn.so
|
|
||||||
%dir %{_libdir}/cmake/dnnl
|
%dir %{_libdir}/cmake/dnnl
|
||||||
%{_libdir}/cmake/dnnl/*.cmake
|
%{_libdir}/cmake/dnnl/*.cmake
|
||||||
%dir %{_libdir}/cmake/mkldnn
|
|
||||||
%{_libdir}/cmake/mkldnn/*.cmake
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Aug 6 2022 wisespreading <wisespreading@gmail.com> - 2.6-1
|
||||||
|
- Update to 2.6 for AMX
|
||||||
* Wed Dec 22 2021 baihuawei <baihuawei@huawei.com> - 2.2-3
|
* Wed Dec 22 2021 baihuawei <baihuawei@huawei.com> - 2.2-3
|
||||||
- Fix spec file.
|
- Fix spec file.
|
||||||
* Wed Dec 1 2021 baihuawei <baihuawei@huawei.com> - 2.2-2
|
* Wed Dec 1 2021 baihuawei <baihuawei@huawei.com> - 2.2-2
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user