Projects
Factory:RISC-V:ROCm
hiprand
_service:tar_scm:hiprand.spec
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:hiprand.spec of Package hiprand
%global upstreamname hipRAND %global rocm_release 6.2 %global rocm_patch 2 %global rocm_version %{rocm_release}.%{rocm_patch} %global toolchain rocm # hipcc does not support some clang flags %global build_cxxflags %(echo %{optflags} | sed -e 's/-fstack-protector-strong/-Xarch_host -fstack-protector-strong/' -e 's/-fcf-protection/-Xarch_host -fcf-protection/') # $gpu will be evaluated in the loops below %global _vpath_builddir %{_vendor}-%{_target_os}-build-${gpu} %bcond_with debug %if %{with debug} %global build_type DEBUG %else %global build_type RelWithDebInfo %endif %bcond_with test %if %{with test} %global build_test ON %global __brp_check_rpaths %{nil} %else %global build_test OFF %endif Name: hiprand Version: %{rocm_version} Release: 1 Summary: HIP random number generator Url: https://github.com/ROCm/%{upstreamname} License: MIT and BSD Source0: %{url}/archive/rocm-%{version}.tar.gz#/%{upstreamname}-%{version}.tar.gz BuildRequires: git BuildRequires: cmake BuildRequires: doxygen BuildRequires: ninja-build BuildRequires: rocm-cmake BuildRequires: rocm-comgr-devel BuildRequires: rocm-hip-devel BuildRequires: rocm-rpm-macros BuildRequires: rocm-runtime-devel BuildRequires: rocrand-devel %if %{with test} BuildRequires: gtest-devel %endif #Use compat if LLVM is not latest, 1 is enable %global compat_build 1 %global maj_ver 18 %if %{compat_build} BuildRequires: llvm%{maj_ver}-devel BuildRequires: llvm%{maj_ver}-test BuildRequires: llvm%{maj_ver}-cmake-utils BuildRequires: llvm%{maj_ver}-libs BuildRequires: lld%{maj_ver} BuildRequires: lld%{maj_ver}-devel BuildRequires: clang%{maj_ver}-devel BuildRequires: clang%{maj_ver}-libs BuildRequires: clang%{maj_ver}-tools-extra %else BuildRequires: llvm-devel = %{version} BuildRequires: llvm-test = %{version} BuildRequires: llvm-cmake-utils = %{version} %endif # Only x86_64 works right now: ExclusiveArch: x86_64 riscv64 %description hipRAND is a RAND marshalling library, with multiple supported backends. It sits between the application and the backend RAND library, marshalling inputs into the backend and results back to the application. hipRAND exports an interface that does not require the client to change, regardless of the chosen backend. Currently, hipRAND supports either rocRAND or cuRAND. %package devel Summary: The hipRAND development package Requires: %{name}%{?_isa} = %{version}-%{release} Requires: rocrand-devel %description devel The hipRAND development package. %if %{with test} %package test Summary: Tests for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description test %{summary} %endif %prep %autosetup -p1 -n %{upstreamname}-rocm-%{version} #Remove RPATH: sed -i '/INSTALL_RPATH/d' CMakeLists.txt %build for gpu in %{rocm_gpu_list} do module load rocm/$gpu mkdir %{_target_platform}-$gpu pushd %{_target_platform}-$gpu %cmake .. -G Ninja \ -DCMAKE_BUILD_TYPE=%{build_type} \ -DCMAKE_SKIP_RPATH=ON \ -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF \ -DAMDGPU_TARGETS=${ROCM_GPUS} \ -DCMAKE_INSTALL_LIBDIR=$ROCM_LIB \ -DCMAKE_INSTALL_BINDIR=$ROCM_BIN \ -DBUILD_TEST=%{build_test} \ %if %{compat_build} -DCMAKE_CXX_FLAGS="--rocm-device-lib-path=%{_prefix}/lib/clang/%{maj_ver}/amdgcn/bitcode" \ %endif -DROCM_SYMLINK_LIBS=OFF popd cmake --build %{_target_platform}-$gpu %{?_smp_mflags} --verbose module purge done %install for gpu in %{rocm_gpu_list} do DESTDIR=%{buildroot} cmake --install %{_target_platform}-$gpu done echo s@%{buildroot}@@ > br.sed find %{buildroot}%{_libdir} -name '*.so.*.[0-9]' | sed -f br.sed > %{name}.files find %{buildroot}%{_libdir} -name '*.so.[0-9]' | sed -f br.sed >> %{name}.files find %{buildroot}%{_libdir} -name '*.so' | sed -f br.sed > %{name}.devel find %{buildroot}%{_libdir} -name '*.cmake' | sed -f br.sed >> %{name}.devel %if %{with test} find %{buildroot} -name 'test_*' | sed -f br.sed > %{name}.test %endif %files -f %{name}.files %doc README.md %license %{_docdir}/%{name}/LICENSE.txt %files devel -f %{name}.devel %{_includedir}/%{name} %if %{with test} %files test -f %{name}.test %endif %changelog * Mon Oct 28 2024 misaka00251 <liuxin@iscas.ac.cn> - 6.2.2-1 - Init package
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2