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/hipcub] epel10: Reuse Archlinux smoke test
Date: Thu, 11 Jun 2026 13:23:15 GMT [thread overview]
Message-ID: <178118419589.1.6094321164368441607.rpms-hipcub-ffda8f1ce3ca@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/hipcub
Branch : epel10
Commit : ffda8f1ce3cae4f4123af3ce92c015f0a2e52ca6
Author : Tom Rix <Tom.Rix@amd.com>
Date : 2026-02-11T07:45:05-08:00
Stats : +58/-1 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/hipcub/c/ffda8f1ce3cae4f4123af3ce92c015f0a2e52ca6?branch=epel10
Log:
Reuse Archlinux smoke test
Licensed as 0BSD
repo https://gitlab.archlinux.org/archlinux/packaging/packages/hipcub.git
commit 1b4b1d224ff16f6de30543a64133475b218a3c4d
Signed-off-by: Tom Rix <Tom.Rix@amd.com>
---
diff --git a/hipcub.spec b/hipcub.spec
index 8c4ac21..cf9d6a2 100644
--- a/hipcub.spec
+++ b/hipcub.spec
@@ -82,7 +82,7 @@ Release: 1%{?dist}
%endif
Summary: ROCm port of CUDA CUB library
-License: MIT and BSD-3-Clause
+License: MIT AND BSD-3-Clause 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..79fd950
--- /dev/null
+++ b/test.cpp
@@ -0,0 +1,48 @@
+#include <hipcub/hipcub.hpp>
+#include <vector>
+#include <iostream>
+#include <random>
+#include <algorithm>
+
+int main()
+{
+ size_t size = 1024;
+ std::vector<float> xin(size);
+
+ std::random_device rd;
+ std::mt19937 gen(rd());
+ std::uniform_real_distribution<float> dist(-1.0, 1.0);
+
+ auto myrand = [&]() -> float {return dist(gen);};
+
+ std::generate(xin.begin(), xin.end(), myrand);
+
+ float *x;
+ float *xs;
+ hipMalloc((void**)&x, sizeof *x * size);
+ hipMalloc((void**)&xs, sizeof *xs * size);
+
+ hipMemcpy(x, xin.data(), sizeof *x * size, hipMemcpyHostToDevice);
+
+ void *tmp_storage = nullptr;
+ size_t tmp_storage_bytes = 0;
+ hipcub::DeviceRadixSort::SortKeys(tmp_storage, tmp_storage_bytes, x, xs, size);
+ hipMalloc((void**)&tmp_storage, tmp_storage_bytes);
+ hipcub::DeviceRadixSort::SortKeys(tmp_storage, tmp_storage_bytes, x, xs, size);
+
+ std::vector<float> xout(size);
+ hipMemcpy(xout.data(), xs, sizeof *xs * size, hipMemcpyDeviceToHost);
+
+ for(size_t i = 1; i < size; i++){
+ if(xout[i - 1] > xout[i]){
+ std::cout << "Elements not sorted at index " << i << "\n";
+ std::cout << x[i - 1] << " " << x[i] << std::endl;
+ return 1;
+ }
+ }
+ std::cout << "TESTS PASSED!" << std::endl;
+
+ hipFree(x);
+ hipFree(xs);
+ hipFree(tmp_storage);
+}
diff --git a/test.sh b/test.sh
new file mode 100755
index 0000000..4cdf5fc
--- /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} -lamdhip64
+"$OUT"/test
reply other threads:[~2026-06-11 13:23 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=178118419589.1.6094321164368441607.rpms-hipcub-ffda8f1ce3ca@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