1 |
commit: e43cdcb7f19aad551480d2587283a22649abb035 |
2 |
Author: YiyangWu <xgreenlandforwyy <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Apr 10 09:02:40 2022 +0000 |
4 |
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 1 08:52:51 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e43cdcb7 |
7 |
|
8 |
dev-util/rocm_bandwidth_test: initial import |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/24971 |
11 |
Signed-off-by: YiyangWu <xgreenlandforwyy <AT> gmail.com> |
12 |
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org> |
13 |
|
14 |
dev-util/rocm_bandwidth_test/Manifest | 2 ++ |
15 |
.../files/4.3.0-use-proper-delete-operator.patch | 31 ++++++++++++++++++++++ |
16 |
dev-util/rocm_bandwidth_test/metadata.xml | 11 ++++++++ |
17 |
.../rocm_bandwidth_test-4.3.0.ebuild | 22 +++++++++++++++ |
18 |
.../rocm_bandwidth_test-5.0.2.ebuild | 26 ++++++++++++++++++ |
19 |
5 files changed, 92 insertions(+) |
20 |
|
21 |
diff --git a/dev-util/rocm_bandwidth_test/Manifest b/dev-util/rocm_bandwidth_test/Manifest |
22 |
new file mode 100644 |
23 |
index 000000000000..eab455cef102 |
24 |
--- /dev/null |
25 |
+++ b/dev-util/rocm_bandwidth_test/Manifest |
26 |
@@ -0,0 +1,2 @@ |
27 |
+DIST rocm_bandwidth_test-4.3.0.tar.gz 37965 BLAKE2B e4689c4a11257aecf98a0a047dcb56bc23deb8e781d819488c9c934ee2ea6914f0de49a48f09c3895383f715659ff750c0fb2bbf3ec136350d935bd159d2237b SHA512 8c646cbb736ab50bf25302566436cda9acb496a639453ae35235de34ec5ace1cc1a5a1544eb3482114386c9f8b850d4572e2eef6884c7cab50e9a4b6b37f67c0 |
28 |
+DIST rocm_bandwidth_test-5.0.2.tar.gz 38091 BLAKE2B bf9767d55a3400fa1bc95a638a9fd6debcd3b0cd8f5d698eb5d39568c5dc7321c5a63c6678b4bc91f7bd5ff9cee13da7800b3a7523a24a0ceae607be8b18b0b4 SHA512 b235838442dd12e0283b36168eed4853094f423b8b61e3f623be78133af9f89406fb83254972d5a622f90998450660165205deb95082cb49907f112f4de80942 |
29 |
|
30 |
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 |
31 |
new file mode 100644 |
32 |
index 000000000000..d5a2998b3979 |
33 |
--- /dev/null |
34 |
+++ b/dev-util/rocm_bandwidth_test/files/4.3.0-use-proper-delete-operator.patch |
35 |
@@ -0,0 +1,31 @@ |
36 |
+From 964e03c013c6827cfa3f6ca0bed81b77d1884b40 Mon Sep 17 00:00:00 2001 |
37 |
+From: Michael Klemm <michael.klemm@×××.com> |
38 |
+Date: Mon, 7 Jun 2021 16:55:46 +0200 |
39 |
+Subject: [PATCH] Fix issue #73 by using the proper delete[] operator |
40 |
+ |
41 |
+--- |
42 |
+ rocm_bandwidth_test_report.cpp | 4 ++-- |
43 |
+ 1 file changed, 2 insertions(+), 2 deletions(-) |
44 |
+ |
45 |
+diff --git a/rocm_bandwidth_test_report.cpp b/rocm_bandwidth_test_report.cpp |
46 |
+index 8895705..d4a0f60 100755 |
47 |
+--- a/rocm_bandwidth_test_report.cpp |
48 |
++++ b/rocm_bandwidth_test_report.cpp |
49 |
+@@ -341,7 +341,7 @@ void RocmBandwidthTest::DisplayCopyTimeMatrix(bool peak) const { |
50 |
+ double* perf_matrix = new double[agent_index_ * agent_index_](); |
51 |
+ PopulatePerfMatrix(peak, perf_matrix); |
52 |
+ PrintPerfMatrix(false, peak, perf_matrix); |
53 |
+- free(perf_matrix); |
54 |
++ delete[] perf_matrix; |
55 |
+ } |
56 |
+ |
57 |
+ void RocmBandwidthTest::DisplayValidationMatrix() const { |
58 |
+@@ -349,7 +349,7 @@ void RocmBandwidthTest::DisplayValidationMatrix() const { |
59 |
+ double* perf_matrix = new double[agent_index_ * agent_index_](); |
60 |
+ PopulatePerfMatrix(true, perf_matrix); |
61 |
+ PrintPerfMatrix(true, true, perf_matrix); |
62 |
+- free(perf_matrix); |
63 |
++ delete[] perf_matrix; |
64 |
+ } |
65 |
+ |
66 |
+ void RocmBandwidthTest::DisplayDevInfo() const { |
67 |
|
68 |
diff --git a/dev-util/rocm_bandwidth_test/metadata.xml b/dev-util/rocm_bandwidth_test/metadata.xml |
69 |
new file mode 100644 |
70 |
index 000000000000..37913a6924f6 |
71 |
--- /dev/null |
72 |
+++ b/dev-util/rocm_bandwidth_test/metadata.xml |
73 |
@@ -0,0 +1,11 @@ |
74 |
+<?xml version="1.0" encoding="UTF-8"?> |
75 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
76 |
+<pkgmetadata> |
77 |
+ <maintainer type="project"> |
78 |
+ <email>sci@g.o</email> |
79 |
+ </maintainer> |
80 |
+ <maintainer type="person"> |
81 |
+ <email>xgreenlandforwyy@×××××.com</email> |
82 |
+ <name>Yiyang Wu</name> |
83 |
+ </maintainer> |
84 |
+</pkgmetadata> |
85 |
|
86 |
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 |
87 |
new file mode 100644 |
88 |
index 000000000000..4d6aa988c9e9 |
89 |
--- /dev/null |
90 |
+++ b/dev-util/rocm_bandwidth_test/rocm_bandwidth_test-4.3.0.ebuild |
91 |
@@ -0,0 +1,22 @@ |
92 |
+# Copyright 2022 Gentoo Authors |
93 |
+# Distributed under the terms of the GNU General Public License v2 |
94 |
+ |
95 |
+EAPI=8 |
96 |
+ |
97 |
+inherit cmake |
98 |
+ |
99 |
+DESCRIPTION="Bandwidth test for ROCm" |
100 |
+HOMEPAGE="https://github.com/RadeonOpenCompute/rocm_bandwidth_test" |
101 |
+SRC_URI="https://github.com/RadeonOpenCompute/${PN}/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" |
102 |
+ |
103 |
+LICENSE="NCSA-AMD" |
104 |
+SLOT="0/$(ver_cut 1-2)" |
105 |
+KEYWORDS="~amd64" |
106 |
+ |
107 |
+DEPEND="dev-libs/rocr-runtime:${SLOT}" |
108 |
+RDEPEND="${DEPEND}" |
109 |
+BDEPEND="" |
110 |
+ |
111 |
+PATCHES=( "${FILESDIR}/4.3.0-use-proper-delete-operator.patch" ) |
112 |
+ |
113 |
+S="${WORKDIR}/${PN}-rocm-${PV}" |
114 |
|
115 |
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 |
116 |
new file mode 100644 |
117 |
index 000000000000..6353571d9ac8 |
118 |
--- /dev/null |
119 |
+++ b/dev-util/rocm_bandwidth_test/rocm_bandwidth_test-5.0.2.ebuild |
120 |
@@ -0,0 +1,26 @@ |
121 |
+# Copyright 2022 Gentoo Authors |
122 |
+# Distributed under the terms of the GNU General Public License v2 |
123 |
+ |
124 |
+EAPI=8 |
125 |
+ |
126 |
+inherit cmake |
127 |
+ |
128 |
+DESCRIPTION="Bandwidth test for ROCm" |
129 |
+HOMEPAGE="https://github.com/RadeonOpenCompute/rocm_bandwidth_test" |
130 |
+SRC_URI="https://github.com/RadeonOpenCompute/${PN}/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" |
131 |
+ |
132 |
+LICENSE="NCSA-AMD" |
133 |
+SLOT="0/$(ver_cut 1-2)" |
134 |
+KEYWORDS="~amd64" |
135 |
+ |
136 |
+DEPEND="dev-libs/rocr-runtime:${SLOT}" |
137 |
+RDEPEND="${DEPEND}" |
138 |
+BDEPEND="" |
139 |
+ |
140 |
+S="${WORKDIR}/${PN}-rocm-${PV}" |
141 |
+ |
142 |
+src_install() { |
143 |
+ cmake_src_install |
144 |
+ |
145 |
+ rm -rfv "${ED}"/usr/share/doc/rocm-bandwidth-test |
146 |
+} |