1
0
forked from pool/onednn

Accepting request 1005196 from home:Guillaume_G:branches:science:machinelearning

- Add patch to fix build with latest Arm Compute Library:
  * 1428.patch
  * fa93750.patch (dep for 1428.patch)

OBS-URL: https://build.opensuse.org/request/show/1005196
OBS-URL: https://build.opensuse.org/package/show/science:machinelearning/onednn?expand=0&rev=18
This commit is contained in:
Guillaume GARDET 2022-09-21 12:12:47 +00:00 committed by Git OBS Bridge
parent be408c785e
commit f2a81390aa
4 changed files with 1267 additions and 0 deletions

34
1428.patch Normal file
View File

@ -0,0 +1,34 @@
From 24d4c1379d3c4cbf423f979fa25283b1914159c7 Mon Sep 17 00:00:00 2001
From: Diana Bite <diana.bite@arm.com>
Date: Thu, 21 Jul 2022 12:27:17 +0100
Subject: [PATCH] cpu: aarch64: acl: disallow large padding in ACL wino to be
consist with oneDNN
---
src/cpu/aarch64/acl_convolution_utils.cpp | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/cpu/aarch64/acl_convolution_utils.cpp b/src/cpu/aarch64/acl_convolution_utils.cpp
index db3bde6a48..542033df0e 100644
--- a/src/cpu/aarch64/acl_convolution_utils.cpp
+++ b/src/cpu/aarch64/acl_convolution_utils.cpp
@@ -307,10 +307,17 @@ status_t init_conf_wino(acl_conv_conf_t &acp, memory_desc_t &src_md,
// General Compute Library checks, memory tags are also set there
CHECK(acl_init_conf(acp, src_md, weights_md, dst_md, bias_md, cd, attr));
- const bool wino_shape_ok // unit strides only, no dilations
+ const bool shape_ok
+ // only unit strides allowed
= (acp.padstride_info.stride() == std::pair<uint, uint> {1, 1})
+ // Note: Compute Library supports arbitrary padding for wino kernels
+ // but we only allow small padding to be consistent with oneDNN
+ && (acp.padstride_info.pad().first <= 1) // padding left/right
+ && (acp.padstride_info.pad().second <= 1) // padding top/bottom
+ // only non-dilated convolutions allowed
&& (acp.dilation_info == arm_compute::Size2D(1, 1));
- if (!wino_shape_ok) return status::unimplemented;
+
+ ACL_CHECK_SUPPORT(!shape_ok, "shape not supported by winograd kernels");
// clang-format off
// Validate convolution manually to check for return status

1222
fa93750.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Sep 20 08:26:43 UTC 2022 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Add patch to fix build with latest Arm Compute Library:
* 1428.patch
* fa93750.patch (dep for 1428.patch)
-------------------------------------------------------------------
Tue Sep 13 05:22:52 UTC 2022 - Paolo Stivanin <info@paolostivanin.com>

View File

@ -37,6 +37,10 @@ Summary: Intel Math Kernel Library for Deep Neural Networks
License: Apache-2.0
URL: https://01.org/onednn
Source0: https://github.com/oneapi-src/oneDNN/archive/v%{version}/oneDNN-%{version}.tar.gz
# PATCH-FIX-UPSTREAM - deps for Patch2
Patch1: fa93750.patch
# PATCH-FIX-UPSTREAM - Fix build with latest ACL - https://github.com/oneapi-src/oneDNN/pull/1428
Patch2: 1428.patch
BuildRequires: chrpath
BuildRequires: cmake
BuildRequires: doxygen