commit:     5ea5cbe8296c62669befeb745c0dec9a80706eba
Author:     Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Sun Jan 12 14:01:59 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan 26 13:59:31 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ea5cbe8

sci-libs/rocRAND: Fix compilation issue with benchmark use flag

Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/40224
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/rocRAND-6.3.0-benchmark-1.8.patch        | 30 ++++++++++++++++++++++
 sci-libs/rocRAND/rocRAND-6.3.0.ebuild              |  3 ++-
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/sci-libs/rocRAND/files/rocRAND-6.3.0-benchmark-1.8.patch 
b/sci-libs/rocRAND/files/rocRAND-6.3.0-benchmark-1.8.patch
new file mode 100644
index 000000000000..a8afeb1e2f8e
--- /dev/null
+++ b/sci-libs/rocRAND/files/rocRAND-6.3.0-benchmark-1.8.patch
@@ -0,0 +1,30 @@
+Backported from 
https://github.com/ROCm/rocRAND/commit/ad8cdd8dd0dee6ef4166b0b560fe63127c06e08b
+Index: rocRAND-rocm-6.3.0/benchmark/custom_csv_formater.hpp
+===================================================================
+--- rocRAND-rocm-6.3.0.orig/benchmark/custom_csv_formater.hpp
++++ rocRAND-rocm-6.3.0/benchmark/custom_csv_formater.hpp
+@@ -152,10 +152,8 @@ void customCSVReporter::ReportRuns(const
+ void customCSVReporter::PrintRunData(const Run& run)
+ {
+     std::ostream& Out = GetOutputStream();
+-    std::ostream& Err = GetErrorStream();
+ 
+     //get the name of the engine and distribution:
+-
+     std::string temp = run.benchmark_name();
+ 
+     std::string deviceName = std::string(temp.begin(), temp.begin() + 
temp.find("<"));
+@@ -186,13 +184,6 @@ void customCSVReporter::PrintRunData(con
+ 
+     Out << engineName << "," << disName << "," << mode << ",";
+     Out << CsvEscape(run.benchmark_name()) << ",";
+-    if(run.error_occurred)
+-    {
+-        Err << std::string(elements.size() - 3, ',');
+-        Err << "true,";
+-        Err << CsvEscape(run.error_message) << "\n";
+-        return;
+-    }
+ 
+     // Do not print iteration on bigO and RMS report
+     if(!run.report_big_o && !run.report_rms)

diff --git a/sci-libs/rocRAND/rocRAND-6.3.0.ebuild 
b/sci-libs/rocRAND/rocRAND-6.3.0.ebuild
index e3b1aa20b634..d5b38455f3d0 100644
--- a/sci-libs/rocRAND/rocRAND-6.3.0.ebuild
+++ b/sci-libs/rocRAND/rocRAND-6.3.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -22,6 +22,7 @@ RESTRICT="!test? ( test )"
 
 PATCHES=(
        "${FILESDIR}"/${PN}-5.7.1_fix_generator_alignment.patch
+       "${FILESDIR}"/${PN}-6.3.0-benchmark-1.8.patch
 )
 
 RDEPEND="dev-util/hip"

Reply via email to