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/rocfft] epel10: Reuse Archlinux smoke test
Date: Thu, 11 Jun 2026 13:36:16 GMT [thread overview]
Message-ID: <178118497606.1.7752433932303802193.rpms-rocfft-dd5c6e295ccc@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rocfft
Branch : epel10
Commit : dd5c6e295cccfb3bb129228cf93dda6fd6d71dc5
Author : Tom Rix <Tom.Rix@amd.com>
Date : 2026-02-10T06:43:19-08:00
Stats : +77/-1 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/rocfft/c/dd5c6e295cccfb3bb129228cf93dda6fd6d71dc5?branch=epel10
Log:
Reuse Archlinux smoke test
Licensed as 0BSD
repo https://gitlab.archlinux.org/archlinux/packaging/packages/rocfft.git
commit 300da3f6692b33787ec66f08c56f54dc47001b27
Signed-off-by: Tom Rix <Tom.Rix@amd.com>
---
diff --git a/rocfft.spec b/rocfft.spec
index ee0f9f3..1fd1d83 100755
--- a/rocfft.spec
+++ b/rocfft.spec
@@ -129,7 +129,7 @@ Version: %{rocm_version}
Release: 1%{?dist}
%endif
Summary: ROCm Fast Fourier Transforms (FFT) library
-License: MIT
+License: MIT AND 0BSD
URL: https://github.com/ROCm/rocm-libraries
%if %{with gitcommit}
diff --git a/test.cpp b/test.cpp
new file mode 100644
index 0000000..c1b0149
--- /dev/null
+++ b/test.cpp
@@ -0,0 +1,67 @@
+#include <rocfft/rocfft.h>
+#include <hip/hip_runtime.h>
+#include <hip/hip_vector_types.h>
+#include <vector>
+#include <numeric>
+#include <cmath>
+#include <iostream>
+
+int main()
+{
+ size_t size = 1024 * 1024;
+
+ rocfft_setup();
+
+ float2 *x;
+ hipMalloc((void**)&x, sizeof *x * size);
+
+
+ std::vector<float2> xin(size);
+ for(auto &xx: xin){
+ xx.x = 1.0f;
+ xx.y = 0.0f;
+ }
+ hipMemcpy(x, xin.data(), sizeof *x * size, hipMemcpyHostToDevice);
+
+ rocfft_plan plan = nullptr;
+ size_t len = size;
+ rocfft_plan_create(&plan, rocfft_placement_inplace,
+ rocfft_transform_type_complex_forward, rocfft_precision_single,
+ 1, &len, 1, nullptr);
+ size_t work_size = 0;
+ rocfft_plan_get_work_buffer_size(plan, &work_size);
+ void *work;
+ rocfft_execution_info info = nullptr;
+ if(work_size){
+ rocfft_execution_info_create(&info);
+ hipMalloc((void**)&work, work_size);
+ rocfft_execution_info_set_work_buffer(info, work, work_size);
+ }
+ rocfft_execute(plan, (void**)&x, nullptr, info);
+
+ std::vector<float2> xout(size);
+ hipMemcpy(xout.data(), x, sizeof *x * size, hipMemcpyDeviceToHost);
+
+ std::vector<float2> xref(size);
+ for(auto &xx: xref){
+ xx.x = 0.0f;
+ xx.y = 0.0f;
+ }
+ xref[0].x = 1.0f * size;
+
+ float tol = 0.001f;
+ for(size_t i = 0; i < size; i++){
+ if(std::abs(xref[i].x - xout[i].x) + std::abs(xref[i].y - xout[i].y) > tol){
+ std::cout << "Element mismatch at index " << i << "\n";
+ std::cout << "Expected: " << xref[i].x << " " << xref[i].y << "\n";
+ std::cout << "Actual : " << xout[i].x << " " << xout[i].y << "\n";
+ return 1;
+ }
+ }
+
+ std::cout << "TESTS PASSED!" << std::endl;
+
+ hipFree(x);
+ rocfft_plan_destroy(plan);
+ rocfft_cleanup();
+}
diff --git a/test.sh b/test.sh
new file mode 100755
index 0000000..f432bc1
--- /dev/null
+++ b/test.sh
@@ -0,0 +1,9 @@
+#! /usr/bin/env sh
+
+BPATH=/usr/bin
+IPATH=/usr/include
+LPATH=/usr/lib64
+
+OUT=$(mktemp -d)
+${BPATH}/hipcc -o "$OUT"/test test.cpp -I${IPATH} -L${LPATH} -lrocfft -lamdhip64
+"$OUT"/test
reply other threads:[~2026-06-11 13:36 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=178118497606.1.7752433932303802193.rpms-rocfft-dd5c6e295ccc@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