public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Tom Rix <Tom.Rix@amd.com>
To: git-commits@fedoraproject.org
Subject: [rpms/hipfft] rawhide: Fix test failure
Date: Tue, 29 Sep 2026 15:15:24 GMT [thread overview]
Message-ID: <179069492471.1.12849144181732299735.rpms-hipfft-76079b92ad5c@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/hipfft
Branch : rawhide
Commit : 76079b92ad5c774b60f8cb84e3c790642da814c6
Author : Tom Rix <Tom.Rix@amd.com>
Date : 2026-09-29T08:14:56-07:00
Stats : +49/-2 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/hipfft/c/76079b92ad5c774b60f8cb84e3c790642da814c6?branch=rawhide
Log:
Fix test failure
Signed-off-by: Tom Rix <Tom.Rix@amd.com>
---
diff --git a/0001-fix-cast-unsigned-return-to-ptrdiff_t-in-get_random_.patch b/0001-fix-cast-unsigned-return-to-ptrdiff_t-in-get_random_.patch
new file mode 100644
index 0000000..ca8f01f
--- /dev/null
+++ b/0001-fix-cast-unsigned-return-to-ptrdiff_t-in-get_random_.patch
@@ -0,0 +1,41 @@
+From 957ad84ed6b5f18e2c3fdc7e9c3b0777ebc51029 Mon Sep 17 00:00:00 2001
+From: Tom Rix <Tom.Rix@amd.com>
+Date: Tue, 29 Sep 2026 06:18:31 -0700
+Subject: [PATCH] fix: cast unsigned return to ptrdiff_t in get_random_dist to
+ prevent assertion failure
+
+The function max_byte_size_for_hipfftw_tests() returns size_t (unsigned).
+Applying unary minus to an unsigned type results in a huge positive
+wraparound value instead of a negative range bound. This causes
+std::uniform_int_distribution to fail the _GLIBCXX_ASSERTIONS check
+(_M_a <= _M_b) on Fedora/strict libstdc++ builds.
+
+Fix by explicitly casting to ptrdiff_t before negation. The range is
+computed locally as static const to avoid repeated division while
+remaining compatible with non-constexpr runtime evaluation.
+---
+ projects/hipfft/clients/tests/hipfftw_test.cpp | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/projects/hipfft/clients/tests/hipfftw_test.cpp b/projects/hipfft/clients/tests/hipfftw_test.cpp
+index 142727859357..7e9ed3c9016a 100644
+--- a/projects/hipfft/clients/tests/hipfftw_test.cpp
++++ b/projects/hipfft/clients/tests/hipfftw_test.cpp
+@@ -1495,11 +1495,10 @@ namespace
+ return ret;
+ };
+ auto get_random_dist = []() {
++ static const ptrdiff_t half_range = static_cast<ptrdiff_t>(max_byte_size_for_hipfftw_tests())
++ / (static_cast<ptrdiff_t>(max_nbatch_for_hipfftw_test) * sizeof(hipfftw_complex_t<prec>));
+ static std::uniform_int_distribution<ptrdiff_t> dist_rng(
+- -max_byte_size_for_hipfftw_tests()
+- / (max_nbatch_for_hipfftw_test * sizeof(hipfftw_complex_t<prec>)),
+- max_byte_size_for_hipfftw_tests()
+- / (max_nbatch_for_hipfftw_test * sizeof(hipfftw_complex_t<prec>)));
++ -half_range, half_range);
+ return dist_rng(get_pseudo_rng());
+ };
+
+--
+2.55.0
+
diff --git a/hipfft.spec b/hipfft.spec
index 27393eb..1fdbf65 100644
--- a/hipfft.spec
+++ b/hipfft.spec
@@ -88,7 +88,7 @@ Version: %{rocm_version}
%if %{with preview}
Release: 0%{?dist}
%else
-Release: 1%{?dist}
+Release: 2%{?dist}
%endif
Summary: ROCm FFT marshaling library
License: MIT AND BSD-3-Clause
@@ -98,6 +98,9 @@ License: MIT AND BSD-3-Clause
URL: https://github.com/ROCm/rocm-libraries
Source0: %{url}/releases/download/%{pkg_src}/%{upstreamname}.tar.gz#/%{upstreamname}-%{version}.tar.gz
+# https://github.com/ROCm/rocm-libraries/pull/12713/changes/0e4902a9ea0c0d5ee3c90aa029f57a121a908568
+Patch1: 0001-fix-cast-unsigned-return-to-ptrdiff_t-in-get_random_.patch
+
# Only x86_64 works right now
ExclusiveArch: x86_64
@@ -172,7 +175,7 @@ Requires: rocm-filesystem%{pkg_suffix}
%endif
%prep
-%autosetup -p1 -n %{upstreamname}
+%autosetup -p3 -n %{upstreamname}
# https://github.com/ROCm/rocm-libraries/issues/2400
sed -i '/rocm_set_soversion(hipfft .*/a\
@@ -240,6 +243,9 @@ export LD_LIBRARY_PATH=%{_vpath_builddir}/library:$LD_LIBRARY_PATH
%endif
%changelog
+* Tue Sep 29 2026 Tom Rix <Tom.Rix@amd.com> - 10.0.0-2
+- Fix test failure
+
* Sun Sep 20 2026 Tom Rix <Tom.Rix@amd.com> - 10.0.0-1
- Update to 10.0
reply other threads:[~2026-09-29 15:15 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=179069492471.1.12849144181732299735.rpms-hipfft-76079b92ad5c@fedoraproject.org \
--to=tom.rix@amd.com \
--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