public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Luya Tshimbalanga <luya@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/oidn] rawhide: Split hip backend as recommended subpackage
Date: Sat, 14 Nov 2026 04:07:08 GMT [thread overview]
Message-ID: <179462922872.1.1747755937982331392.rpms-oidn-baa5b70fa469@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/oidn
Branch : rawhide
Commit : baa5b70fa46935a17d3332417bb6c3e586cda388
Author : Luya Tshimbalanga <luya@fedoraproject.org>
Date : 2026-11-13T21:06:26-07:00
Stats : +63/-28 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/oidn/c/baa5b70fa46935a17d3332417bb6c3e586cda388?branch=rawhide
Log:
Split hip backend as recommended subpackage
---
diff --git a/oidn.spec b/oidn.spec
index 554d29f..437f978 100644
--- a/oidn.spec
+++ b/oidn.spec
@@ -1,28 +1,30 @@
-%bcond gcc 0 #Use clang by default
-# Temporaritly disable hip
-%bcond hip 0 #%%{undefined flatpak}
+# Use clang by default.
+%bcond gcc 0
+%bcond hip %{undefined flatpak}
%bcond ninja 1
-#%%global prerelease beta
+#%%global prerelease beta
Name: oidn
Version: 2.5.1
Release: %autorelease %{?prerelease: -p -e %{prerelease}}
-Summary: Library of denoising filters for images rendered with ray tracing
+Summary: Library of noise reduction filters for images rendered with ray tracing
License: Apache-2.0
URL: https://openimagedenoise.github.io/
Source0: https://github.com/OpenImageDenoise/%{name}/releases/download/v%{version}%{?prerelease:-%{prerelease}}/%{name}-%{version}%{?prerelease:-%{prerelease}}.src.tar.gz
-%if %{with hip}
-# hipcc is clang based and the extra rpm induced gcc args confuse it
+%if %{without gcc}
%global toolchain clang
+%endif
+
+%if %{with hip}
# hipcc does not support some clang flags
%global build_cxxflags %(echo %{optflags} | sed -e 's/-fstack-protector-strong//' -e 's/-fcf-protection//' -e 's/-mtls-dialect=gnu2//' )
%endif
-# Library only available on x86_64
+# This package currently enables only x86_64 builds.
ExclusiveArch: x86_64
-BuildRequires: cmake >= 3.13.0
+BuildRequires: cmake >= 3.21
# Enable HIP support
%if %{with hip}
BuildRequires: hipcc
@@ -31,6 +33,7 @@ BuildRequires: rocm-runtime
%endif
# Needed to remove rpath from apps
BuildRequires: chrpath
+BuildRequires: binutils
%if %{with gcc}
BuildRequires: gcc-c++
%else
@@ -38,7 +41,8 @@ BuildRequires: clang
%endif
BuildRequires: help2man
BuildRequires: cmake(ispcrt)
-Recommends: ispc-gpu
+BuildRequires: ispc >= 1.30.0
+BuildRequires: python3
%if %{with ninja}
BuildRequires: ninja-build
%endif
@@ -47,15 +51,28 @@ BuildRequires: pkgconfig(python3)
BuildRequires: pkgconfig(tbb)
%description
-Intel Open Image Denoise is an open source library of high-performance,
-high-quality denoising filters for images rendered with ray tracing.
+Intel Open Image Denoise is an open source library of high-performance,
+high-quality noise reduction filters for images rendered with ray tracing.
%package libs
Summary: Libraries for %{name}
+%if %{with hip}
+Recommends: %{name}-libs-hip%{?_isa} = %{version}-%{release}
+%endif
%description libs
The %{name}-libs package contains shared library for %{name}.
+# Enable HIP support
+%if %{with hip}
+%package libs-hip
+Summary: HIP backend for %{name}
+Requires: %{name}-libs%{?_isa} = %{version}-%{release}
+
+%description libs-hip
+The %{name}-libs-hip package provides the AMD GPU noise reduction backend.
+%endif
+
%package devel
Summary: Development files for %{name}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
@@ -66,7 +83,6 @@ applications that use %{name}.
%package docs
Summary: Documentation for %{name}
-Requires: %{name}-libs%{?_isa} = %{version}-%{release}
BuildArch: noarch
%description docs
@@ -80,12 +96,17 @@ The %{name}-docs package contains documentation for %{name}.
%if %{with ninja}
-G Ninja \
%endif
- -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \
+ -DOIDN_DEVICE_CPU=ON \
+ -DOIDN_DEVICE_HIP=%{?with_hip:ON}%{!?with_hip:OFF} \
%if %{with hip}
- -DOIDN_DEVICE_HIP=ON \
+ -DROCM_PATH=%{_libdir} \
-DOIDN_DEVICE_HIP_COMPILER=%{_bindir}/hipcc \
- -DROCM_PATH=%{_libdir}
%endif
+ -DOIDN_APPS=ON \
+ -DOIDN_APPS_OPENIMAGEIO=ON \
+ -DOIDN_INSTALL_DEPENDENCIES=OFF \
+ %{nil}
+
%cmake_build
%install
@@ -93,8 +114,9 @@ The %{name}-docs package contains documentation for %{name}.
# Generate and install man pages.
install -d '%{buildroot}%{_mandir}/man1'
-for cmd in %{buildroot}%{_bindir}/*
+for app in %{name}Denoise %{name}Test %{name}Benchmark
do
+ cmd="%{buildroot}%{_bindir}/${app}"
LD_LIBRARY_PATH='%{buildroot}%{_libdir}' \
help2man \
--no-info --no-discard-stderr --version-string='%{version}' \
@@ -102,35 +124,48 @@ do
"${cmd}"
done
-# Remove rpath
-chrpath --delete %{buildroot}%{_bindir}/%{name}{Denoise,Test,Benchmark}
-chrpath --delete %{buildroot}%{_libdir}/libOpenImageDenoise{,_core,_device_cpu}.so.*
-%if %{with hip}
-chrpath --delete %{buildroot}%{_libdir}/libOpenImageDenoise_device_hip.so.*
-%endif
+# Remove RPATH/RUNPATH from regular ELF files, skipping symlinks.
+find %{buildroot}%{_bindir} %{buildroot}%{_libdir} -type f | while IFS= read -r elf
+do
+ if readelf -h "$elf" >/dev/null 2>&1; then
+ if readelf -d "$elf" | grep -qE '\((RPATH|RUNPATH)\)'; then
+ chrpath --delete "$elf"
+ fi
+ fi
+done
# Remove duplicated documentation
rm -rf %{buildroot}%{_docdir}/OpenImageDenoise
+%check
+# Run upstream tests on the CPU; builders do not need GPU access.
+OIDN_DEVICE_HIP=0 OIDN_DEVICE_SYCL=0 OIDN_DEVICE_CUDA=0 OIDN_DEVICE_METAL=0 \
+LD_LIBRARY_PATH="%{buildroot}%{_libdir}" \
+ %{buildroot}%{_bindir}/oidnTest --device cpu
+
%files
-%license LICENSE.txt
-%doc CHANGELOG.md
+%doc CHANGELOG.md
%{_bindir}/%{name}{Denoise,Test,Benchmark}
%{_mandir}/man1/%{name}{Denoise,Test,Benchmark}.1.gz
%files libs
+%license LICENSE.txt
%{_libdir}/libOpenImageDenoise{,_core,_device_cpu}.so.2
%{_libdir}/libOpenImageDenoise{,_core,_device_cpu}.so.%{version}
+
%if %{with hip}
+%files libs-hip
%{_libdir}/libOpenImageDenoise_device_hip.so.%{version}
%endif
%files docs
-%doc README.md readme.pdf
+%license LICENSE.txt
+%doc README.md readme.pdf
%files devel
-%{_libdir}/cmake/OpenImageDenoise-%{version}/*.cmake
-%{_includedir}/OpenImageDenoise
+%doc README.md
+%{_libdir}/cmake/OpenImageDenoise-%{version}/
+%{_includedir}/OpenImageDenoise/
%{_libdir}/libOpenImageDenoise.so
%changelog
reply other threads:[~2026-11-14 4:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179462922872.1.1747755937982331392.rpms-oidn-baa5b70fa469@fedoraproject.org \
--to=luya@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox