summaryrefslogtreecommitdiff
path: root/dev-util/rocminfo
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-08-06 20:10:31 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-08-06 20:10:31 +0100
commit944b3df0f275eea0fd7808913d72a0b280df0c33 (patch)
treeec33697fafd5ce7028b7619baef7a6d27bb74362 /dev-util/rocminfo
parent7e17b5aabc330abb894f2b90bef0e3fcbcd180d2 (diff)
gentoo auto-resync : 06:08:2022 - 20:10:30
Diffstat (limited to 'dev-util/rocminfo')
-rw-r--r--dev-util/rocminfo/Manifest3
-rw-r--r--dev-util/rocminfo/files/rocminfo-5.1.3-detect-builtin-amdgpu.patch50
-rw-r--r--dev-util/rocminfo/rocminfo-5.1.3.ebuild31
3 files changed, 84 insertions, 0 deletions
diff --git a/dev-util/rocminfo/Manifest b/dev-util/rocminfo/Manifest
index 5ab865139858..cc02af025d4b 100644
--- a/dev-util/rocminfo/Manifest
+++ b/dev-util/rocminfo/Manifest
@@ -1,4 +1,5 @@
AUX rocminfo-4.3.0-detect-builtin-amdgpu.patch 936 BLAKE2B f4011201ae5cd4ecd495caa72b3b8e1eda5011265394388eea558479f7aceacf22193a0774f5a9919380b770429d1f40d056c1efde535f5db73bbb6e0d705d33 SHA512 78d075a8640a5223f914390e957fda4ec0297266fbda5837d339560732bd8aac5c46365b1b00cbe4650007d3ca94c711fc838849d74ce0dc4b9fcebc18a7fadb
+AUX rocminfo-5.1.3-detect-builtin-amdgpu.patch 1720 BLAKE2B 990b0bfd101fbe41e7dfda85f88d18763371f7c9cdc46ac10a5c695c45d8e29c08f1444b44524ba0917489b89d4906498c81e9e8d805f5ab9b98e2160a394799 SHA512 c193cc7f72df6cc8d5118f1f55ae184f8d80083aee255efb64762b4f0cc00f2c8973515617630dd8267dc1053cac4d1773683870563c29000eb4fd32a7f54e78
DIST rocminfo-3.10.0.tar.gz 15106 BLAKE2B 7cc90a1c0b9c5f8664dc6c9bebe83f590526565df8ccb3b3d137ca1db42a7ae9640c43a2de01ae13319d8ea3267709ff8b0a70d2b4473d84d5350f7568a897fa SHA512 79eae3c294c1f3077515b807f9b0070a32122542ac6330704b9e0130366717361e046a9ccd5f43a02770746d2123292020d94de6878d053aec58519f1bd36521
DIST rocminfo-3.7.0.tar.gz 15104 BLAKE2B 728ce471e52dadca8b59aa3196c2f75933650e3002335014accd7f8eada19d4936a7404f908d50747a0e51faa8a65764200072cf598f9d0855a3052db8290160 SHA512 25a6a9216366e310ece9db50a21bc0eb7741760a7b46fa1818ee102557000348f430f9269e2ba9e872437dfafcb31ac563476e2bf83a10705fde8dd5fc854404
DIST rocminfo-3.8.0.tar.gz 15103 BLAKE2B afa6a2cd3315b18f2711cf1de4701e672beac76d08548453f9377c865f2b108f4f50340f545a9040450c7acded3ac093d334908a7ceddba35c847136fe92aa77 SHA512 c75fa7a4116b9cfa75d6b7ff3920c85ad19fea09ab5f6a7abebde9cd184763905aea8684574f6b1919044806af8ab35a81d7f6010cbd0fb18b36699a182b5f39
@@ -8,6 +9,7 @@ DIST rocminfo-4.1.0.tar.gz 15379 BLAKE2B dcf7a663792538dbe5c02fbc9e5874d1e716f29
DIST rocminfo-4.2.0.tar.gz 15379 BLAKE2B a76dd3f0d550d5b8a8c39454ef44d5f0a76ad24e4a3b75a9fd2a1b0d4d983a02a877c0eb4d2e4158f9c8c97602b52a2de9a1f535fad609a52e8cad48c4c8a833 SHA512 801c29ae88878b9448ad2f2c9faaa7ffba3a46c77887bebf2fa8d3db7e9258fb4678cf2b898ddfc88a34fcc0fdcc91c9aa2f4a1509eeb05db6a7b085ae28f3dc
DIST rocminfo-4.3.0.tar.gz 15379 BLAKE2B 86683d8e88d26a8730cf84b3a1d4f69231ff7158186ca6b867b5a029ae485978cf0d67db2b07c05c046bb300b55b6e80e280b9429cef903e3077dc1da0945b8d SHA512 88b7f1ad86e76ede270d12fc3065eba192fcf3938d749b8345dac3b71be0985071dc5139a801ff46015369cd09b3eefcd8ff9ea71ab297476dda195f57792849
DIST rocminfo-5.0.2.tar.gz 15767 BLAKE2B 4617e4df51cc0b02d1743e655491600510e4f9fc22ef47612aa69bc311e7dc3979b0063c650d9a4fee0124be404b92c110dc9db056a554ee25ba3d4bfd12f618 SHA512 dd02837e621a414b54ef50b52ca816509ffa8b613e7de5f8b09449c5fc543dee054860a2245462008f687683af48203b6d2080fe71bf6e3654981d6bfd56e254
+DIST rocminfo-5.1.3.tar.gz 16772 BLAKE2B 1b35661f9e6cd8cd5180ef3e4fd3dd8e7d6b282947d25c81b0b8bd347a5bee11cf87d950bbd8adcbd7a8a3053c41622b8e99fc0b56f4a14bdf4acf20992becc7 SHA512 998d499b0ae9a22bde30b2c26e31587a78b5ed63a19649d5b203eb47a044f17d1d4d3e951ec094d5be1ca3ba37efa4b19f5b53047727158170fa90c13a8c7563
EBUILD rocminfo-3.10.0.ebuild 614 BLAKE2B 06e1e5b14bd58c8ca3519a9b446fec7e6ce46043cbb0bfedd6bc22b9e45d3c41d03a135c742c5451aa3b23d3a811fe76dcd0d71ba29f8ea37b62b4626414c8c3 SHA512 523379bff77eee0cb15ff6fa529f724698fb4e3ea590af72555db46ae51644ecfc3c4ece36db2a3864314f66ec4bbe8fed954cccf4d1fb2afcbb8115b020a840
EBUILD rocminfo-3.7.0.ebuild 614 BLAKE2B 06e1e5b14bd58c8ca3519a9b446fec7e6ce46043cbb0bfedd6bc22b9e45d3c41d03a135c742c5451aa3b23d3a811fe76dcd0d71ba29f8ea37b62b4626414c8c3 SHA512 523379bff77eee0cb15ff6fa529f724698fb4e3ea590af72555db46ae51644ecfc3c4ece36db2a3864314f66ec4bbe8fed954cccf4d1fb2afcbb8115b020a840
EBUILD rocminfo-3.8.0.ebuild 614 BLAKE2B 06e1e5b14bd58c8ca3519a9b446fec7e6ce46043cbb0bfedd6bc22b9e45d3c41d03a135c742c5451aa3b23d3a811fe76dcd0d71ba29f8ea37b62b4626414c8c3 SHA512 523379bff77eee0cb15ff6fa529f724698fb4e3ea590af72555db46ae51644ecfc3c4ece36db2a3864314f66ec4bbe8fed954cccf4d1fb2afcbb8115b020a840
@@ -17,5 +19,6 @@ EBUILD rocminfo-4.1.0.ebuild 614 BLAKE2B 93d578aeac7bbd6173fa8133c1da9240c351e0f
EBUILD rocminfo-4.2.0.ebuild 614 BLAKE2B 93d578aeac7bbd6173fa8133c1da9240c351e0fe62f5cfc5ff10d12d68e116b3320276eb25c29180e45969594d16215d90921a4c21caa9d2d68f8f87ed9bf1f0 SHA512 0bcf6920d17952e31f090b2a0830a70cfbe737a31987024a7901d9728795b9166cac2894f6ec995e17a71f7cf33001655e8b5a4c1956413a38d0751b7c1669ac
EBUILD rocminfo-4.3.0.ebuild 679 BLAKE2B f3efa2bbccc24bcc06179594a432ce9d53b3dfe89e545bfbc6d712fb928db7a89db764a03e988ab60f0ceaf5d52ac58680b8130a96365c6b6401b2d9df7de066 SHA512 cfd93c79aa88dedcd1e80223494e6e27b62cc949bede65c471bba4dc25da12f9fe687af0c8ff42a31f84d3132e74d64ab9a4774c212e2d5242a2daff438a2e1e
EBUILD rocminfo-5.0.2.ebuild 788 BLAKE2B adf51ef812b52a6a5e81086b9561e76f0b04b36e304bfbbbc3dbbb7cfae1515b298e58f3644c371511115cfface8f70416aa32b2605de56e0549c3851e194263 SHA512 e3a5a2babe283f645d2c614381ea6e724dda8ace49449a1777ac8dafa98bc3f59947d8c8b65f2cf31d35be393a44f03947957d2c8a6f23e4fdab76beabfbbf28
+EBUILD rocminfo-5.1.3.ebuild 916 BLAKE2B acf34ad534cdafdf9409ee3f357ab47b01238e39b23bb10da0be48421a40bb7800a485643787ae446916833ac625ef59a8f1b10f714ed1bd68464ffd65a2d58c SHA512 cb8b43112fd94df38c4b4c47b1aa2a8cdb9b319e605ec64a7d615ebabf53bee850643f8d47b2445cb54531285cf3cdcc18b734898f1e9da65203960f7a6ae251
EBUILD rocminfo-9999.ebuild 606 BLAKE2B 74046413f39f646c076f8cbc9d0a5d1373c3be8e303bd50767d6019d3b1a58a06d05ef0dbdacdcd079aeb519c28fc163c38246608024b9fc4225c99051d3b6df SHA512 20dcaa312421446d3ee1882f85babfdfd51a51dd598eae824b36d7fc8969da717f05685d436c59b61d2d1744479672a4de544667379a7fb9163c5e9637fab70c
MISC metadata.xml 370 BLAKE2B 25693db5400c16b160c544c9afbf0a093c18cc94164e38fcde05e50cf6cbeef1f4875f59cf83830f8e700a60508b913430208b96518cc9a14c14f036d8152748 SHA512 763bc8e1c7f89ae046514b721ece281146d0b80768f49699ba8f347ff5f8c6a8facb8e6554c0ac0abfb195797acfb51f30f322fe90f6d342320a1d9cb44e1740
diff --git a/dev-util/rocminfo/files/rocminfo-5.1.3-detect-builtin-amdgpu.patch b/dev-util/rocminfo/files/rocminfo-5.1.3-detect-builtin-amdgpu.patch
new file mode 100644
index 000000000000..5d0b2ed284bd
--- /dev/null
+++ b/dev-util/rocminfo/files/rocminfo-5.1.3-detect-builtin-amdgpu.patch
@@ -0,0 +1,50 @@
+/sys/module/amdgpu instead of lsmod for builtin amdgpu kernel module
+
+https://github.com/RadeonOpenCompute/rocminfo/pull/43
+https://github.com/RadeonOpenCompute/rocminfo/issues/42
+From ea4f017ed035928b1970e2589b02ec9b348c863e Mon Sep 17 00:00:00 2001
+From: YiyangWu <xgreenlandforwyy@gmail.com>
+Date: Wed, 18 Aug 2021 21:05:20 +0800
+Subject: [PATCH] Check /sys/module/amdgpu for ROCk instead of lsmod
+
+Closes: #42
+
+Signed-off-by: YiyangWu <xgreenlandforwyy@gmail.com>
+---
+ rocminfo.cc | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/rocminfo.cc b/rocminfo.cc
+index 871f406..58c847d 100755
+--- a/rocminfo.cc
++++ b/rocminfo.cc
+@@ -995,6 +995,8 @@ AcquireAndDisplayAgentInfo(hsa_agent_t agent, void* data) {
+ err = AcquireAgentInfo(agent, &agent_i);
+ RET_IF_HSA_ERR(err);
+
++ std::string ind(kIndentSize, ' ');
++
+ printLabel("*******", true);
+ std::string agent_ind("Agent ");
+ agent_ind += std::to_string(*agent_number).c_str();
+@@ -1031,16 +1033,16 @@ AcquireAndDisplayAgentInfo(hsa_agent_t agent, void* data) {
+
+ int CheckInitialState(void) {
+ // Check kernel module for ROCk is loaded
+- FILE *fd = popen("lsmod | grep amdgpu", "r");
+- char buf[16];
+- if (fread (buf, 1, sizeof (buf), fd) == 0) {
++ int module_dir;
++ module_dir = open("/sys/module/amdgpu", O_DIRECTORY);
++ if (module_dir < 0) {
+ printf("%sROCk module is NOT loaded, possibly no GPU devices%s\n",
+ COL_RED, COL_RESET);
+ return -1;
+ } else {
+ printf("%sROCk module is loaded%s\n", COL_WHT, COL_RESET);
++ close(module_dir);
+ }
+- pclose(fd);
+
+ // Check if user belongs to the group for /dev/kfd (e.g. "video" or
+ // "render")
diff --git a/dev-util/rocminfo/rocminfo-5.1.3.ebuild b/dev-util/rocminfo/rocminfo-5.1.3.ebuild
new file mode 100644
index 000000000000..c090c863e060
--- /dev/null
+++ b/dev-util/rocminfo/rocminfo-5.1.3.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/RadeonOpenCompute/rocminfo/"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/RadeonOpenCompute/rocminfo/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+ S="${WORKDIR}/rocminfo-rocm-${PV}"
+fi
+
+DESCRIPTION="ROCm Application for Reporting System Info"
+HOMEPAGE="https://github.com/RadeonOpenCompute/rocminfo"
+LICENSE="UoI-NCSA"
+SLOT="0/$(ver_cut 1-2)"
+
+RDEPEND=">=dev-libs/rocr-runtime-${PV}"
+DEPEND="${RDEPEND}"
+
+PATCHES=("${FILESDIR}/${PN}-5.1.3-detect-builtin-amdgpu.patch")
+
+src_prepare() {
+ sed -e "/CPACK_RESOURCE_FILE_LICENSE/d" -i CMakeLists.txt || die
+ sed -e "/num_change_since_prev_pkg(/cset(NUM_COMMITS 0)" -i cmake_modules/utils.cmake || die # Fix QA issue on "git not found"
+ cmake_src_prepare
+}