Skip to content

Commit

Permalink
dev-util/rocm_bandwidth_test: initial import
Browse files Browse the repository at this point in the history
Signed-off-by: YiyangWu <xgreenlandforwyy@gmail.com>
  • Loading branch information
littlewu2508 committed Apr 10, 2022
1 parent 8245901 commit 6f95ac0
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dev-util/rocm_bandwidth_test/Manifest
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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 {
11 changes: 11 additions & 0 deletions dev-util/rocm_bandwidth_test/metadata.xml
Original file line number Diff line number Diff line change
@@ -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>
22 changes: 22 additions & 0 deletions dev-util/rocm_bandwidth_test/rocm_bandwidth_test-4.3.0.ebuild
Original file line number Diff line number Diff line change
@@ -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}"
26 changes: 26 additions & 0 deletions dev-util/rocm_bandwidth_test/rocm_bandwidth_test-5.0.2.ebuild
Original file line number Diff line number Diff line change
@@ -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 -fv "${ED}"/usr/share/doc/rocm-bandwidth-test
}

0 comments on commit 6f95ac0

Please sign in to comment.