|
|
78b7f2 |
Name: libzdnn
|
|
|
78b7f2 |
Version: 0.4.0
|
|
|
78b7f2 |
Release: 3%{?dist}
|
|
|
78b7f2 |
Summary: Driver library for the IBM Z Neural Network Processing Assist Facility
|
|
|
78b7f2 |
|
|
|
78b7f2 |
License: ASL 2.0
|
|
|
78b7f2 |
Url: https://github.com/IBM/zDNN
|
|
|
78b7f2 |
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
|
|
78b7f2 |
|
|
|
78b7f2 |
ExclusiveArch: s390x
|
|
|
78b7f2 |
BuildRequires: gcc
|
|
|
78b7f2 |
BuildRequires: cpp
|
|
|
78b7f2 |
BuildRequires: make
|
|
|
78b7f2 |
BuildRequires: gawk
|
|
|
78b7f2 |
BuildRequires: automake
|
|
|
78b7f2 |
BuildRequires: autoconf
|
|
|
78b7f2 |
|
|
|
78b7f2 |
# Be explicit about the soversion in order to avoid unintentional changes.
|
|
|
78b7f2 |
%global soversion 0
|
|
|
78b7f2 |
|
|
|
78b7f2 |
%description
|
|
|
78b7f2 |
The zDNN library provide a user space API for exploitation of the
|
|
|
78b7f2 |
Neural Network Processing Assist Facility. All application which
|
|
|
78b7f2 |
intend to use that facility on IBM Z are supposed to do this via this
|
|
|
78b7f2 |
library.
|
|
|
78b7f2 |
|
|
|
78b7f2 |
|
|
|
78b7f2 |
%package devel
|
|
|
78b7f2 |
Summary: Development files for %{name}
|
|
|
78b7f2 |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
78b7f2 |
|
|
|
78b7f2 |
%description devel
|
|
|
78b7f2 |
The %{name}-devel package contains libraries and header files for
|
|
|
78b7f2 |
developing applications that use %{name}.
|
|
|
78b7f2 |
|
|
|
78b7f2 |
|
|
|
78b7f2 |
%package static
|
|
|
78b7f2 |
Summary: Static library version %{name}
|
|
|
78b7f2 |
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
|
|
78b7f2 |
|
|
|
78b7f2 |
%description static
|
|
|
78b7f2 |
The %{name}-static package contains the static library of %{name}.
|
|
|
78b7f2 |
|
|
|
78b7f2 |
|
|
|
78b7f2 |
%prep
|
|
|
78b7f2 |
%autosetup -p1 -n zDNN-%{version}
|
|
|
78b7f2 |
autoreconf -i
|
|
|
78b7f2 |
|
|
|
78b7f2 |
%build
|
|
|
78b7f2 |
# libzdnn needs to be built with z14 support so override the distro wide options to append -march=z14.
|
|
|
78b7f2 |
# cflags for the init routines in e.g. zdnn_init.c should just use the distro options.
|
|
|
78b7f2 |
# export CFLAGS_INIT explicitely since it is not handled by configure
|
|
|
78b7f2 |
CFLAGS_INIT="%{build_cflags}"; export CFLAGS_INIT; CFLAGS="%{build_cflags} -march=z14 -mtune=z14" CXXFLAGS="%{build_cxxflags} -march=z14 -mtune=z14" %configure
|
|
|
78b7f2 |
%make_build build
|
|
|
78b7f2 |
|
|
|
78b7f2 |
%install
|
|
|
78b7f2 |
%make_install
|
|
|
78b7f2 |
mv $RPM_BUILD_ROOT%{_libdir}/libzdnn.so.%{soversion} $RPM_BUILD_ROOT%{_libdir}/libzdnn.so.%{version}
|
|
|
78b7f2 |
ln -s -r $RPM_BUILD_ROOT%{_libdir}/libzdnn.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libzdnn.so.%{soversion}
|
|
|
78b7f2 |
|
|
|
78b7f2 |
rm -f $RPM_BUILD_ROOT%{_libdir}/libzdnn.so
|
|
|
78b7f2 |
ln -s -r $RPM_BUILD_ROOT%{_libdir}/libzdnn.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libzdnn.so
|
|
|
78b7f2 |
|
|
|
78b7f2 |
|
|
|
78b7f2 |
%files
|
|
|
78b7f2 |
%{_libdir}/libzdnn.so.%{version}
|
|
|
78b7f2 |
%{_libdir}/libzdnn.so.%{soversion}
|
|
|
78b7f2 |
%doc README.md
|
|
|
78b7f2 |
%license LICENSE
|
|
|
78b7f2 |
|
|
|
78b7f2 |
%files devel
|
|
|
78b7f2 |
%{_includedir}/zdnn.h
|
|
|
78b7f2 |
%{_libdir}/*.so
|
|
|
78b7f2 |
|
|
|
78b7f2 |
%files static
|
|
|
78b7f2 |
%{_libdir}/libzdnn.a
|
|
|
78b7f2 |
|
|
|
78b7f2 |
%changelog
|
|
|
78b7f2 |
* Wed Mar 23 2022 Jakub Čajka <jcajka@redhat.com> - 0.4.0-3
|
|
|
78b7f2 |
- Sync with upstream
|
|
|
78b7f2 |
|
|
|
78b7f2 |
* Wed Mar 09 2022 Jakub Čajka <jcajka@redhat.com> - 0.4.0-2
|
|
|
78b7f2 |
- Added gating
|
|
|
78b7f2 |
|
|
|
78b7f2 |
* Wed Mar 09 2022 Jakub Čajka <jcajka@redhat.com> - 0.4.0-1
|
|
|
78b7f2 |
- Initial package version import
|