summaryrefslogtreecommitdiff
path: root/dev-util/rocm-smi
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/rocm-smi
parent7e17b5aabc330abb894f2b90bef0e3fcbcd180d2 (diff)
gentoo auto-resync : 06:08:2022 - 20:10:30
Diffstat (limited to 'dev-util/rocm-smi')
-rw-r--r--dev-util/rocm-smi/Manifest3
-rw-r--r--dev-util/rocm-smi/files/rocm-smi-5.1.3-detect-builtin-amdgpu.patch26
-rw-r--r--dev-util/rocm-smi/rocm-smi-5.1.3.ebuild62
3 files changed, 91 insertions, 0 deletions
diff --git a/dev-util/rocm-smi/Manifest b/dev-util/rocm-smi/Manifest
index 01b244895966..102dd8ac2452 100644
--- a/dev-util/rocm-smi/Manifest
+++ b/dev-util/rocm-smi/Manifest
@@ -1,11 +1,14 @@
AUX rocm-smi-5.0.2-gcc12-memcpy.patch 605 BLAKE2B 8dcf4c74b9f1ccf832d71cc8b54d50aa1c7c2978bd70c359875548b753bcf52b54bfefe30b34aecc211499c9b46a9b0e62661ef8725c1c1ef3cde81da669b581 SHA512 7a39dcae0fd99fc82b92fca0a9080d42f9378065f120712132a42841ed67c056ff469e3b13760181f5d96861c1169fe8c6f0426e5351e5b67d6439605a11c41f
+AUX rocm-smi-5.1.3-detect-builtin-amdgpu.patch 983 BLAKE2B c1d926ce5ce1bef272f718f1f37869e5432993ca016ff7278cc14d7744d61efc813ee100e462bb9bb1bd61975fb620e82eaab37abe94bf415a9e40815919f59a SHA512 cd22af4b79ef366d10a36d663faf89c60a618aa9394fcac96d3521a9b9d1d270d20e216d918f18222930d883a8e2c72588ef97ab5a60086eed950a0ccfc7cddb
DIST rocm-smi-4.0.0.tar.gz 45065 BLAKE2B 90a28c162099deaa67c98701b79328c760973d88fa598f8a66116927483f25dbfd85366312c4c6e8e64fa2199dfb32fb661db04b464bd58cb39dea09a84ac51e SHA512 63c1274470df079320164d29cb4c009f52e59ffebdadfefe73cbe21238a70858fd5a86417b9f81ab2c405bc64707b02ddbf65e9d301f757f245b60152cd63dcf
DIST rocm-smi-4.3.0.tar.gz 1672482 BLAKE2B 21b35daa565ce368ac10110ba73f723c5d2125e401f5c8fa2d8e3300f450f39dd0c1de74681249868a842b568af0f2cf0d1f7bf0d40d338a7d1ee7c9e25b67dd SHA512 2bf5d3f1be50636c7c848cfa982fcdb6fbf25d648bcbe2a195e1153c7f4c8b11b2b3650aaa110eec780a218a1503afe84637c7d6e7e868e7065f8c51d8d3b8dd
DIST rocm-smi-4.5.2.tar.gz 1674835 BLAKE2B 7cf69170a4a8dedfdc467e3b8dc64bd829136062487814e169cca0deabcd05d8adaf4fc440173e10cd8117ae63119f10a09c3042b0915b865e0620322c940e91 SHA512 640645d07dbc93a85d4e498bcc88fa0caab36b5af0f9feabf8a2383786ccb2b588be625f46e90d1b71803c011891a62a3642098fd0eb83530d5d8e0a49d204dc
DIST rocm-smi-5.0.2.tar.gz 1677784 BLAKE2B 28e136a8b3c630ed7d5b514ad5bf985ff540df8e1fc2378b855032a6ebd2bcbcd4aab5e8a5a9e6462eacd2ac9ada0b8940aed582ce118d1066bded115af42e22 SHA512 bbad2bbebb81de42a15d8aa48e4751dbf9b8f9ee74633d16828f6977fadff35e9db0b7c9ee465a61c40a3e8f2f0f99b79cd5c5b142785cf61958d432f13d7f05
+DIST rocm-smi-5.1.3.tar.gz 1701386 BLAKE2B c5e779f5c33fec0b1b39b09c758dfadd3c24e28f15381593f2959e5c2fb9f49af3a7ca1f9ab7d6bf34c5af4fbe3f0c0ae20c6c049cbf9421a9184735bb4a64a2 SHA512 7bf7af2b42a035c298c2f9009b6123671af41f9ca1a50607cfa362f39dbd82ff88f8c13ece6c4edab585edadd9072ed096a400dd3850851e1beef3633a8eb14e
EBUILD rocm-smi-4.0.0.ebuild 769 BLAKE2B 4a153b49245275a87f45e02d67f86d94c6bf6ea7b2df93cf5a0061f3b7c5b6de33b39c4fd220fa04d8642647eac47383635b84a2c7ec91679ebb09d4e3803897 SHA512 24a62c42e875f0895effa97e6979f41e276b66f0d53198ac549dfce68c1229336ac05241507c7c2ad123874f551d6ca81de7d3496654116956d42dd470fc6039
EBUILD rocm-smi-4.3.0.ebuild 1721 BLAKE2B 6238286bdbc3fe377672443c44412c4111767dea037b698335ed6e5ce13d2b4d680e25ff2119d2023877e72348f502f0b0df78f68bdf64c0256a9723cc428b1b SHA512 c0e9530f588736f1bbd31f5acf29f5979f9884ac2efb58913f146d1582424bdcc725c8262c6adead998b5d0d232a8bca8e31d7eddca713ef53acbb62cdc48ed6
EBUILD rocm-smi-4.5.2.ebuild 1721 BLAKE2B 6238286bdbc3fe377672443c44412c4111767dea037b698335ed6e5ce13d2b4d680e25ff2119d2023877e72348f502f0b0df78f68bdf64c0256a9723cc428b1b SHA512 c0e9530f588736f1bbd31f5acf29f5979f9884ac2efb58913f146d1582424bdcc725c8262c6adead998b5d0d232a8bca8e31d7eddca713ef53acbb62cdc48ed6
EBUILD rocm-smi-5.0.2.ebuild 1792 BLAKE2B 219a84df1c3507b7b6ff70023c6a9b7c20e70bb74bdb00b3b66dd815bc787e97bcda15679a51acb2d6750d4c3d15dbe2b8fbc0e22c8e8bf1e588eead40be2fc3 SHA512 54cfc8b4c28daf189e6ded59fdda18f06525f294a0d097fff01943ace2718d668f98cf17565c9f5429b4816e20376d4a37bb41e8d8d1b3c50b4efd40b86a092b
+EBUILD rocm-smi-5.1.3.ebuild 1847 BLAKE2B f62dc60f89d0e7b3820466e118daac95bbd1d636dde571b946e810b74c2963b60ff5257b5100427d4930159e3c152795f8d7fda9f29ee9f67a7363baa64cb7c7 SHA512 bbdd706f03334093da02b5a870e00bc49af430faf4ccb835ceb7a52e15d456aef71ecdf8cb7369e639d3392853f90f1b8cece8f598dde9bd7ec2718e93c920d8
EBUILD rocm-smi-9999.ebuild 1721 BLAKE2B 6238286bdbc3fe377672443c44412c4111767dea037b698335ed6e5ce13d2b4d680e25ff2119d2023877e72348f502f0b0df78f68bdf64c0256a9723cc428b1b SHA512 c0e9530f588736f1bbd31f5acf29f5979f9884ac2efb58913f146d1582424bdcc725c8262c6adead998b5d0d232a8bca8e31d7eddca713ef53acbb62cdc48ed6
MISC metadata.xml 661 BLAKE2B ed6ec563956132012b44907f348091135c7a463fc47a51ac0726e7749da9a4c33811df87442e576fb510799a50c14949cd20c8ca10a5850ee941a8794b70ef7d SHA512 c047963068b4ccefb73539ecd91b4c3310f0863a674acb15e9843dda7f0c917616dc8cbfe5f859e42d9ee25323bf1b66b1ce7fbe9a2e8292963ac38aa0bd72f3
diff --git a/dev-util/rocm-smi/files/rocm-smi-5.1.3-detect-builtin-amdgpu.patch b/dev-util/rocm-smi/files/rocm-smi-5.1.3-detect-builtin-amdgpu.patch
new file mode 100644
index 000000000000..3f322aef3582
--- /dev/null
+++ b/dev-util/rocm-smi/files/rocm-smi-5.1.3-detect-builtin-amdgpu.patch
@@ -0,0 +1,26 @@
+Detect amdgpu module for amdgpu-builtin kernel
+From dc2a4b5b256692e1a6ecef45210682c316b961e0 Mon Sep 17 00:00:00 2001
+From: YiyangWu <xgreenlandforwyy@gmail.com>
+Date: Sat, 2 Apr 2022 16:40:11 +0800
+Subject: [PATCH] Check /sys/module/amdgpu for ROCk instead of lsmod
+
+Closes: #102
+
+Signed-off-by: YiyangWu <xgreenlandforwyy@gmail.com>
+---
+ python_smi_tools/rocm_smi.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/python_smi_tools/rocm_smi.py b/python_smi_tools/rocm_smi.py
+index 57606ee..35be495 100755
+--- a/python_smi_tools/rocm_smi.py
++++ b/python_smi_tools/rocm_smi.py
+@@ -66,7 +66,7 @@ def driverInitialized():
+ """
+ driverInitialized = ''
+ try:
+- driverInitialized = str(subprocess.check_output("cat /proc/modules|grep amdgpu", shell=True))
++ driverInitialized = str(subprocess.check_output("test -d /sys/module/amdgpu", shell=True))
+ except subprocess.CalledProcessError:
+ pass
+ if len(driverInitialized) > 0:
diff --git a/dev-util/rocm-smi/rocm-smi-5.1.3.ebuild b/dev-util/rocm-smi/rocm-smi-5.1.3.ebuild
new file mode 100644
index 000000000000..7947568516a5
--- /dev/null
+++ b/dev-util/rocm-smi/rocm-smi-5.1.3.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit cmake python-r1
+
+DESCRIPTION="ROCm System Management Interface Library"
+HOMEPAGE="https://github.com/RadeonOpenCompute/rocm_smi_lib"
+
+if [[ ${PV} == *9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/RadeonOpenCompute/rocm_smi_lib"
+ EGIT_BRANCH="master"
+else
+ SRC_URI="https://github.com/RadeonOpenCompute/rocm_smi_lib/archive/rocm-${PV}.tar.gz -> rocm-smi-${PV}.tar.gz"
+ KEYWORDS="~amd64"
+ S="${WORKDIR}/rocm_smi_lib-rocm-${PV}"
+fi
+
+LICENSE="MIT NCSA-AMD"
+SLOT="0/$(ver_cut 1-2)"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND=""
+RDEPEND="${PYTHON_DEPS}"
+BDEPEND=""
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.0.2-gcc12-memcpy.patch
+ "${FILESDIR}"/${PN}-5.1.3-detect-builtin-amdgpu.patch
+)
+
+src_prepare() {
+ sed -e "/DESTINATION/s,\${OAM_NAME}/lib,$(get_libdir)," \
+ -e "/DESTINATION/s,oam/include/oam,include/oam," -i oam/CMakeLists.txt || die
+ sed -e "/link DESTINATION/,+1d" \
+ -e "/DESTINATION/s,\${ROCM_SMI}/lib,$(get_libdir)," \
+ -e "/bindings_link/,+3d" \
+ -e "/rsmiBindings.py/,+1d" \
+ -e "/DESTINATION/s,rocm_smi/include/rocm_smi,include/rocm_smi," -i rocm_smi/CMakeLists.txt || die
+ sed -e "/LICENSE.txt/d" -e "s,\${ROCM_SMI}/lib/cmake,$(get_libdir)/cmake,g" -i CMakeLists.txt || die
+ sed -e "/^path_librocm = /c\path_librocm = '${EPREFIX}/usr/lib64/librocm_smi64.so'" -i python_smi_tools/rsmiBindings.py || die
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+ -DCMAKE_DISABLE_FIND_PACKAGE_LATEX=ON
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ python_foreach_impl python_newexe python_smi_tools/rocm_smi.py rocm-smi
+ python_foreach_impl python_domodule python_smi_tools/rsmiBindings.py
+}