SHA256
1
0
forked from pool/libzdnn

Accepting request 928010 from home:markkp:branches:science:machinelearning

New package per IBM request, Jira # SLE-21645.
Please make me maintainer/bugowner of the package.
Please add openSUSE:Factory:zSystems to the list of repositories.

OBS-URL: https://build.opensuse.org/request/show/928010
OBS-URL: https://build.opensuse.org/package/show/science:machinelearning/libzdnn?expand=0&rev=1
This commit is contained in:
Christian Goll 2021-11-08 08:14:07 +00:00 committed by Git OBS Bridge
commit bac598ee25
7 changed files with 185 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

5
libzdnn.changes Normal file
View File

@ -0,0 +1,5 @@
-------------------------------------------------------------------
Thu Oct 21 18:58:18 UTC 2021 - Mark Post <mpost.com>
- Initial version of the package (jsc#SLE-21645)

92
libzdnn.spec Normal file
View File

@ -0,0 +1,92 @@
#
# spec file for package libzdnn
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: libzdnn
Version: 0.3.1
Release: 0
Summary: IBM Z Deep Learning Library
License: Apache-2.0
Group: Development/Libraries/Other
URL: https://github.com/IBM/zDNN
Source: zDNN-0.3.1.tar.gz
Patch1: sles15sp4-libzdnn-Limit-symbol-check-to-global-symbols-3.patch
Patch2: sles15sp4-libzdnn-Fix-initialization-of-CFLAGS_INIT-2.patch
BuildRequires: autoconf
BuildRequires: gcc-c++
ExclusiveArch: s390x
%description
IBM Z Deep Neural Network Library (zDNN) provides an interface for
applications making use of Neural Network Processing Assist
Facility (NNPA).
This IBM-provided C library provides a set of functions that handle
the data transformation requirements of the AIU and provide wrapper
functions for the NNPA instruction primitives.
%package -n libzdnn0
Summary: Library interface for the IBM Cryptographic Accelerator
Group: Development/Libraries/Other
%description -n libzdnn0
IBM Z Deep Neural Network Library (zDNN) provides an interface for
applications making use of Neural Network Processing Assist
Facility (NNPA).
This IBM-provided C library provides a set of functions that handle
the data transformation requirements of the AIU and provide wrapper
functions for the NNPA instruction primitives.
%package devel
Summary: Deep Learning Library development files
Requires: libzdnn0 = %{version}-%{release}
%description devel
This package provides the sole include file and symbolic link to the
shared library for the libzdnn (zDNN) RPM.
%prep
%autosetup -p1 -n zDNN-%{version}
%build
autoconf
%configure
%make_build build
%install
%make_install
# We don't want/need the static library at this time. That could change.
rm -vf %{buildroot}/%{_libdir}/libzdnn.a
%post -n libzdnn0
/sbin/ldconfig
%postun -n libzdnn0
/sbin/ldconfig
%files -n libzdnn0
%doc README.md
%license LICENSE
%{_libdir}/libzdnn.so.0
%files devel
%{_includedir}/zdnn.h
%{_libdir}/libzdnn.so
%changelog

View File

@ -0,0 +1,35 @@
From 31d3cc3f331b4ab93ef860bd6afca60f96d56b95 Mon Sep 17 00:00:00 2001
From: Andreas Krebbel <krebbel@linux.ibm.com>
Date: Thu, 21 Oct 2021 12:57:45 +0200
Subject: [PATCH 2/2] Fix initialization of CFLAGS_INIT (#2)
Signed-off-by: Andreas Krebbel <krebbel@linux.ibm.com>
---
config.zdnn | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/config.zdnn b/config.zdnn
index 43225d6..1268897 100644
--- a/config.zdnn
+++ b/config.zdnn
@@ -26,7 +26,7 @@ case "${target}" in
LD=${LD:-g++}
AR=${AR:-ar}
ARFLAGS="${ARFLAGS:--rc}"
- CFLAGS_INIT="-O3 -mzvector -Wall -std=gnu99 -fstack-protector-all ${CFLAGS:-}"
+ CFLAGS_INIT="-O3 -mzvector -Wall -std=gnu99 -fstack-protector-all ${CFLAGS_INIT:-}"
CFLAGS_QUOTE_INIT="-Wall" # Not needed on Linux. Just repeat an option to prevent it from being empty.
CFLAGS="-O3 -march=z14 -mzvector -Wall -std=gnu99 -fstack-protector-all ${CFLAGS:-}"
CFLAGS_QUOTE="-Wall"
@@ -57,7 +57,7 @@ case "${target}" in
AR=${AR:-ar}
ARFLAGS="${ARFLAGS:--rc}"
CXXFLAGS="-I /u/mvsbuild/zos25/usr/include/zos/ -Wc,ASM,LP64,INLINE,VECTOR ${CXXFLAGS:-}"
- CFLAGS_INIT="${CXXFLAGS} -qlanglvl=extc99 ${CFLAGS:-}"
+ CFLAGS_INIT="${CXXFLAGS} -qlanglvl=extc99 ${CFLAGS_INIT:-}"
CFLAGS_QUOTE_INIT="-Wc,SUPPRESS(CCN4108),STACKPROTECT(ALL)" # The options with () require an extra pair of quotes in config.make.in
CFLAGS="${CXXFLAGS} -qlanglvl=extc99 ${CFLAGS:-}"
CFLAGS_QUOTE="-Wc,ARCH(12),SUPPRESS(CCN4108),STACKPROTECT(ALL)"
--
2.26.2

View File

@ -0,0 +1,26 @@
From 15cde2ca92be6d15276ec0eae0f0314fb203109f Mon Sep 17 00:00:00 2001
From: Andreas Krebbel <krebbel@linux.ibm.com>
Date: Thu, 21 Oct 2021 12:57:27 +0200
Subject: [PATCH 1/2] Limit symbol check to global symbols (#3)
Signed-off-by: Andreas Krebbel <krebbel@linux.ibm.com>
---
zdnn/sym_checker.awk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/zdnn/sym_checker.awk b/zdnn/sym_checker.awk
index ba8170d..7459a23 100644
--- a/zdnn/sym_checker.awk
+++ b/zdnn/sym_checker.awk
@@ -283,7 +283,7 @@ fi == fi_dyn && NF >= 8 {
else
dbg(1, "Skipping UND symbol: "dyn_name)
next
- } else if ($7 ~ /[0-9]+/) {
+ } else if ($5 == "GLOBAL" && $7 ~ /[0-9]+/) {
# 'zdnn_sub@@ZDNN_1.0' => 'zdnn_sub' and return > 0 if "@" was found
dyn_sym=dyn_name
if (sub("@.*", "", dyn_sym) == 0) {
--
2.26.2

3
zDNN-0.3.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6b258714a88d5cd6a35d70edf79e1702dc6b80aeb1cc98927268008c23bc318b
size 585293