2023-09-20 16:19:29 +08:00
|
|
|
%define gmem_path /usr/local/gmem
|
|
|
|
|
|
2023-08-07 00:01:39 +08:00
|
|
|
Name: libgmem
|
2023-08-16 00:10:42 +08:00
|
|
|
Version: 0.1
|
2023-09-20 16:19:29 +08:00
|
|
|
Release: 5
|
2023-08-07 00:01:39 +08:00
|
|
|
Summary: Library of Generalized Memory Management
|
|
|
|
|
License: MulanPSL-2.0
|
|
|
|
|
URL: https://gitee.com/openeuler/libgmem
|
2023-08-16 00:10:42 +08:00
|
|
|
Source0: https://gitee.com/openeuler/libgmem/repository/archive/%{name}-v%{version}.tar.gz
|
2023-08-07 00:01:39 +08:00
|
|
|
|
2023-08-29 17:43:04 +08:00
|
|
|
PATCH0001: use-ioctl-instead-of-syscall.patch
|
2023-09-06 20:29:03 +08:00
|
|
|
PATCH0002: fix-three-issue-I7YV2X-I7XQMW-I7Z2RF.patch
|
2023-09-12 11:07:38 +08:00
|
|
|
Patch0003: Structures-and-macros-use-the-default-definition-of-.patch
|
|
|
|
|
Patch0004: optimize-headers-file.patch
|
2023-09-20 16:19:29 +08:00
|
|
|
Patch0005: add-install_npu_driver.sh.patch
|
2023-08-29 17:43:04 +08:00
|
|
|
|
2023-08-07 00:01:39 +08:00
|
|
|
BuildRequires: autoconf automake libtool
|
2023-09-12 11:07:38 +08:00
|
|
|
BuildRequires: gcc glibc-devel make kernel-headers
|
2023-08-07 00:01:39 +08:00
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
libgmem is the abstract layer of GMEM(Generalized Memory Management) user-mode interface,
|
|
|
|
|
which encapsulates some memory characteristics and semantics of GMEM
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
Summary: Header files for libgmem development
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description devel
|
2023-08-16 00:10:42 +08:00
|
|
|
The libgmem-devel package provides header files used for GMEM.
|
2023-08-07 00:01:39 +08:00
|
|
|
|
|
|
|
|
%prep
|
2023-08-16 00:10:42 +08:00
|
|
|
%autosetup -p1 -n %{name}-v%{version}
|
2023-08-07 00:01:39 +08:00
|
|
|
|
2023-08-16 00:10:42 +08:00
|
|
|
%build
|
|
|
|
|
sh ./autogen.sh
|
|
|
|
|
%configure --with-device=Ascend
|
|
|
|
|
%make_build
|
2023-08-07 00:01:39 +08:00
|
|
|
|
2023-08-16 00:10:42 +08:00
|
|
|
%install
|
2023-09-20 16:19:29 +08:00
|
|
|
install -dp %{buildroot}/%{gmem_path}
|
|
|
|
|
install -Dp %{_builddir}/%{name}-v%{version}/scripts/install_npu_driver.sh %{buildroot}/%{gmem_path}/
|
2023-08-16 00:10:42 +08:00
|
|
|
%make_install
|
2023-08-07 00:01:39 +08:00
|
|
|
%delete_la
|
|
|
|
|
|
2023-08-16 00:10:42 +08:00
|
|
|
%ldconfig_scriptlets
|
|
|
|
|
|
2023-08-07 00:01:39 +08:00
|
|
|
%files
|
2023-08-16 00:10:42 +08:00
|
|
|
%license License
|
|
|
|
|
%{_libdir}/%{name}.so*
|
2023-08-07 00:01:39 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%{_includedir}/libgmem.h
|
2023-09-20 16:19:29 +08:00
|
|
|
%dir %{gmem_path}
|
|
|
|
|
%{gmem_path}/install_npu_driver.sh
|
2023-08-07 00:01:39 +08:00
|
|
|
|
|
|
|
|
%changelog
|
2023-09-20 16:19:29 +08:00
|
|
|
* Wed Sep 20 2023 Lemmy Huang <huangliming5@huawei.com> - 0.1-5
|
|
|
|
|
- add install_npu_driver.sh
|
|
|
|
|
|
2023-09-12 11:07:38 +08:00
|
|
|
* Tue Sep 12 2023 Yang Yanchao <yangyanchao6@huawei.com> - 0.1-4
|
|
|
|
|
- Structures and macros use the default definition of the kernel [I80K89]
|
|
|
|
|
optimize headers file
|
|
|
|
|
|
2023-09-06 20:29:03 +08:00
|
|
|
* Wed Sep 06 2023 Yang Yanchao <yangyanchao6@huawei.com> - 0.1-3
|
|
|
|
|
- Check the return ptr of the malloc[#I7YV2X]
|
|
|
|
|
add hnid in gmemPrefetch [#I7XQMW]
|
|
|
|
|
free userData in stream to avoid async operations accessing illeagal address[#I7Z2RF]
|
|
|
|
|
|
2023-08-29 17:43:04 +08:00
|
|
|
* Tue Aug 29 2023 Yang Yanchao <yangyanchao6@huawei.com> - 0.1-2
|
|
|
|
|
- use ioctl instead of syscall
|
|
|
|
|
|
2023-08-16 00:10:42 +08:00
|
|
|
* Sun Aug 13 2023 Yang Yanchao <yangyanchao6@huawei.com> - 0.1-1
|
2023-08-07 00:01:39 +08:00
|
|
|
- Init Package
|