%global base_version 1.3.0 %global prerelease dev3 %bcond check 1 Name: oneapi-umf Version: %{base_version}~%{prerelease} Release: %autorelease Summary: Unified Memory Framework License: Apache-2.0 WITH LLVM-exception AND BSD-1-Clause URL: https://github.com/oneapi-src/unified-memory-framework Source0: %{url}/archive/v%{base_version}-%{prerelease}/unified-memory-framework-%{base_version}-%{prerelease}.tar.gz ExclusiveArch: x86_64 aarch64 ppc64le s390x BuildRequires: cmake BuildRequires: gcc BuildRequires: ninja-build BuildRequires: hwloc-devel BuildRequires: tbb-devel %ifarch x86_64 BuildRequires: oneapi-level-zero-devel %endif %if %{with check} BuildRequires: gcc-c++ BuildRequires: gmock-devel BuildRequires: gtest-devel BuildRequires: numactl-devel %endif Recommends: tbb Provides: intel-umf = %{version}-%{release} Provides: unified-memory-framework = %{version}-%{release} Provides: bundled(uthash) = 2.3.0 %description The Unified Memory Framework (UMF) is a library for constructing allocators and memory pools. It also contains broadly useful abstractions and utilities for memory management. UMF allows users to manage multiple memory pools characterized by different attributes, allowing certain allocation types to be isolated from others and allocated using different hardware resources as required. %package devel Summary: Development files for %{name} License: Apache-2.0 WITH LLVM-exception AND MIT Requires: %{name}%{?_isa} = %{version}-%{release} Provides: intel-umf-devel = %{version}-%{release} Provides: unified-memory-framework-devel = %{version}-%{release} %description devel This package contains the header files, CMake config files and libraries needed to develop applications that use %{name}. %prep %autosetup -n unified-memory-framework-%{base_version}-%{prerelease} -p1 echo %{base_version} > VERSION %build %cmake -G Ninja \ -DUMF_BUILD_SHARED_LIBRARY=ON \ -DUMF_BUILD_CUDA_PROVIDER=OFF \ %ifnarch x86_64 -DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF \ %endif -DUMF_BUILD_EXAMPLES=OFF \ -DUMF_BUILD_TESTS=%{?with_check:ON}%{!?with_check:OFF} %cmake_build %install %cmake_install rm -r %{buildroot}%{_docdir}/umf %if %{with check} %check %ifarch s390x %ctest -j1 -E '^test_proxy_lib_|^test_ctl_unittest$|^test_ctl_api$|^test_disjoint_pool$' %elifarch ppc64le %ctest -j1 -E '^test_proxy_lib_|^test_provider_os_memory$' %else %ctest -j1 -E '^test_proxy_lib_' %endif export LD_PRELOAD=$PWD/%{_vpath_builddir}/lib/libumf_proxy.so %ctest -R '^test_proxy_lib_' %endif %files %license LICENSE.TXT licensing/third-party-programs.txt %doc README.md ChangeLog %{_libdir}/libumf.so.1{,.*} %{_libdir}/libumf_proxy.so.1 %files devel %{_includedir}/umf.h %{_includedir}/umf/ %{_libdir}/libumf.so %{_libdir}/libumf_proxy.so %{_libdir}/cmake/umf/ %changelog %autochangelog