summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYiyangWu <xgreenlandforwyy@gmail.com>2022-04-10 17:02:40 +0800
committerBenda Xu <heroxbd@gentoo.org>2022-05-01 16:52:51 +0800
commite43cdcb7f19aad551480d2587283a22649abb035 (patch)
treebc0be2458cdc203276e5f5b62a4807f50b3991d9 /dev-util
parentdev-libs/rocm-comgr: correct LLVM_PATH and HIP_PATH (diff)
downloadgentoo-e43cdcb7f19aad551480d2587283a22649abb035.tar.gz
gentoo-e43cdcb7f19aad551480d2587283a22649abb035.tar.bz2
gentoo-e43cdcb7f19aad551480d2587283a22649abb035.zip
dev-util/rocm_bandwidth_test: initial import
Closes: https://github.com/gentoo/gentoo/pull/24971 Signed-off-by: YiyangWu <xgreenlandforwyy@gmail.com> Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/rocm_bandwidth_test/Manifest2
-rw-r--r--dev-util/rocm_bandwidth_test/files/4.3.0-use-proper-delete-operator.patch31
-rw-r--r--dev-util/rocm_bandwidth_test/metadata.xml11
-rw-r--r--dev-util/rocm_bandwidth_test/rocm_bandwidth_test-4.3.0.ebuild22
-rw-r--r--dev-util/rocm_bandwidth_test/rocm_bandwidth_test-5.0.2.ebuild26
5 files changed, 92 insertions, 0 deletions
diff --git a/dev-util/rocm_bandwidth_test/Manifest b/dev-util/rocm_bandwidth_test/Manifest
new file mode 100644
index 000000000000..eab455cef102
--- /dev/null
+++ b/dev-util/rocm_bandwidth_test/Manifest
@@ -0,0 +1,2 @@
+DIST rocm_bandwidth_test-4.3.0.tar.gz 37965 BLAKE2B e4689c4a11257aecf98a0a047dcb56bc23deb8e781d819488c9c934ee2ea6914f0de49a48f09c3895383f715659ff750c0fb2bbf3ec136350d935bd159d2237b SHA512 8c646cbb736ab50bf25302566436cda9acb496a639453ae35235de34ec5ace1cc1a5a1544eb3482114386c9f8b850d4572e2eef6884c7cab50e9a4b6b37f67c0
+DIST rocm_bandwidth_test-5.0.2.tar.gz 38091 BLAKE2B bf9767d55a3400fa1bc95a638a9fd6debcd3b0cd8f5d698eb5d39568c5dc7321c5a63c6678b4bc91f7bd5ff9cee13da7800b3a7523a24a0ceae607be8b18b0b4 SHA512 b235838442dd12e0283b36168eed4853094f423b8b61e3f623be78133af9f89406fb83254972d5a622f90998450660165205deb95082cb49907f112f4de80942
diff --git a/dev-util/rocm_bandwidth_test/files/4.3.0-use-proper-delete-operator.patch b/dev-util/rocm_bandwidth_test/files/4.3.0-use-proper-delete-operator.patch
new file mode 100644
index 000000000000..d5a2998b3979
--- /dev/null
+++ b/dev-util/rocm_bandwidth_test/files/4.3.0-use-proper-delete-operator.patch
@@ -0,0 +1,31 @@
+From 964e03c013c6827cfa3f6ca0bed81b77d1884b40 Mon Sep 17 00:00:00 2001
+From: Michael Klemm <michael.klemm@amd.com>
+Date: Mon, 7 Jun 2021 16:55:46 +0200
+Subject: [PATCH] Fix issue #73 by using the proper delete[] operator
+
+---
+ rocm_bandwidth_test_report.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/rocm_bandwidth_test_report.cpp b/rocm_bandwidth_test_report.cpp
+index 8895705..d4a0f60 100755
+--- a/rocm_bandwidth_test_report.cpp
++++ b/rocm_bandwidth_test_report.cpp
+@@ -341,7 +341,7 @@ void RocmBandwidthTest::DisplayCopyTimeMatrix(bool peak) const {
+ double* perf_matrix = new double[agent_index_ * agent_index_]();
+ PopulatePerfMatrix(peak, perf_matrix);
+ PrintPerfMatrix(false, peak, perf_matrix);
+- free(perf_matrix);
++ delete[] perf_matrix;
+ }
+
+ void RocmBandwidthTest::DisplayValidationMatrix() const {
+@@ -349,7 +349,7 @@ void RocmBandwidthTest::DisplayValidationMatrix() const {
+ double* perf_matrix = new double[agent_index_ * agent_index_]();
+ PopulatePerfMatrix(true, perf_matrix);
+ PrintPerfMatrix(true, true, perf_matrix);
+- free(perf_matrix);
++ delete[] perf_matrix;
+ }
+
+ void RocmBandwidthTest::DisplayDevInfo() const {
diff --git a/dev-util/rocm_bandwidth_test/metadata.xml b/dev-util/rocm_bandwidth_test/metadata.xml
new file mode 100644
index 000000000000..37913a6924f6
--- /dev/null
+++ b/dev-util/rocm_bandwidth_test/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ </maintainer>
+ <maintainer type="person">
+ <email>xgreenlandforwyy@gmail.com</email>
+ <name>Yiyang Wu</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-util/rocm_bandwidth_test/rocm_bandwidth_test-4.3.0.ebuild b/dev-util/rocm_bandwidth_test/rocm_bandwidth_test-4.3.0.ebuild
new file mode 100644
index 000000000000..4d6aa988c9e9
--- /dev/null
+++ b/dev-util/rocm_bandwidth_test/rocm_bandwidth_test-4.3.0.ebuild
@@ -0,0 +1,22 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Bandwidth test for ROCm"
+HOMEPAGE="https://github.com/RadeonOpenCompute/rocm_bandwidth_test"
+SRC_URI="https://github.com/RadeonOpenCompute/${PN}/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="NCSA-AMD"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64"
+
+DEPEND="dev-libs/rocr-runtime:${SLOT}"
+RDEPEND="${DEPEND}"
+BDEPEND=""
+
+PATCHES=( "${FILESDIR}/4.3.0-use-proper-delete-operator.patch" )
+
+S="${WORKDIR}/${PN}-rocm-${PV}"
diff --git a/dev-util/rocm_bandwidth_test/rocm_bandwidth_test-5.0.2.ebuild b/dev-util/rocm_bandwidth_test/rocm_bandwidth_test-5.0.2.ebuild
new file mode 100644
index 000000000000..6353571d9ac8
--- /dev/null
+++ b/dev-util/rocm_bandwidth_test/rocm_bandwidth_test-5.0.2.ebuild
@@ -0,0 +1,26 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Bandwidth test for ROCm"
+HOMEPAGE="https://github.com/RadeonOpenCompute/rocm_bandwidth_test"
+SRC_URI="https://github.com/RadeonOpenCompute/${PN}/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="NCSA-AMD"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64"
+
+DEPEND="dev-libs/rocr-runtime:${SLOT}"
+RDEPEND="${DEPEND}"
+BDEPEND=""
+
+S="${WORKDIR}/${PN}-rocm-${PV}"
+
+src_install() {
+ cmake_src_install
+
+ rm -rfv "${ED}"/usr/share/doc/rocm-bandwidth-test
+}