## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global upstreamname HIPIFY %global rocm_release 6.2 %global rocm_patch 0 %global rocm_version %{rocm_release}.%{rocm_patch} # This is a clang tool so best to build with clang %global toolchain clang Name: hipify Version: %{rocm_version} Release: %autorelease Summary: Convert CUDA to HIP Url: https://github.com/ROCm License: MIT Source0: %{url}/%{upstreamname}/archive/refs/tags/rocm-%{version}.tar.gz#/%{upstreamname}-%{version}.tar.gz Patch0: 0001-prepare-hipify-cmake-for-fedora.patch BuildRequires: cmake BuildRequires: compiler-rt BuildRequires: clang-devel BuildRequires: lld BuildRequires: llvm-devel BuildRequires: perl BuildRequires: zlib-devel Requires: perl # ROCm is really only on x86_64 ExclusiveArch: x86_64 %description HIPIFY is a set of tools to translate CUDA source code into portable HIP C++ automatically. %prep %autosetup -p1 -n %{upstreamname}-rocm-%{version} %build %cmake %cmake_build %check echo "void f(int *a, const cudaDeviceProp *b) { cudaChooseDevice(a,b); }" > b.cu echo "void f(int *a, const hipDeviceProp_t *b) { hipChooseDevice(a,b); }" > e.hip ./bin/hipify-perl b.cu -o t.hip diff e.hip t.hip %install %cmake_install rm -rf %{buildroot}/usr/hip # Fix executable perm: chmod a+x %{buildroot}%{_bindir}/* # Fix script shebang (Fedora doesn't allow using "env"): sed -i 's|\(/usr/bin/\)env perl|\1perl|' %{buildroot}%{_bindir}//hipify-perl %files %doc README.md %license LICENSE.txt %{_bindir}/hipconvertinplace-perl.sh %{_bindir}/hipconvertinplace.sh %{_bindir}/hipexamine-perl.sh %{_bindir}/hipexamine.sh %{_bindir}/hipify-clang %{_bindir}/hipify-perl %{_libexecdir}/%{name} %changelog ## START: Generated by rpmautospec * Thu Aug 08 2024 Jeremy Newton - 6.2.0-1 - Update to 6.2 * Thu Jul 18 2024 Fedora Release Engineering - 6.1.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Sat Jul 13 2024 Tom Rix - 6.1.2-2 - Remove extra HIPIFY in Source0 * Thu Jun 06 2024 Jeremy Newton - 6.1.2-1 - Update to 6.1.2 * Sat May 18 2024 Tom Rix - 6.1.1-1 - Update to 6.1.1 * Sun Mar 10 2024 Tom Rix - 6.0.2-1 - Update to 6.0.2 * Wed Jan 24 2024 Fedora Release Engineering - 6.0.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sat Jan 20 2024 Fedora Release Engineering - 6.0.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Wed Dec 20 2023 Jeremy Newton - 6.0.0-1 - Update to 6.0 * Fri Oct 13 2023 Tom Rix - 5.7.0-2 - Address review comments * Sun Oct 1 2023 Tom Rix - 5.7.0-1 - Initial package ## END: Generated by rpmautospec