summaryrefslogtreecommitdiff
path: root/dev-util/rocm-smi
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-27 13:58:28 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-27 13:58:28 +0000
commit8eccda982236f2cfe9188bdcaffd9168134f39a9 (patch)
treea2f9e1db038cdb1c9ae55a8ead0f9020b072d627 /dev-util/rocm-smi
parentf2299aed04cae8310f7fce0be5396370e346d966 (diff)
gentoo auto-resync : 27:01:2023 - 13:58:28
Diffstat (limited to 'dev-util/rocm-smi')
-rw-r--r--dev-util/rocm-smi/Manifest7
-rw-r--r--dev-util/rocm-smi/files/rocm-smi-5.4.2-detect-builtin-amdgpu.patch26
-rw-r--r--dev-util/rocm-smi/rocm-smi-5.1.3-r1.ebuild (renamed from dev-util/rocm-smi/rocm-smi-5.1.3.ebuild)2
-rw-r--r--dev-util/rocm-smi/rocm-smi-5.4.2.ebuild57
-rw-r--r--dev-util/rocm-smi/rocm-smi-9999.ebuild27
5 files changed, 103 insertions, 16 deletions
diff --git a/dev-util/rocm-smi/Manifest b/dev-util/rocm-smi/Manifest
index 108e10e63802..3fc688094598 100644
--- a/dev-util/rocm-smi/Manifest
+++ b/dev-util/rocm-smi/Manifest
@@ -1,8 +1,11 @@
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
+AUX rocm-smi-5.4.2-detect-builtin-amdgpu.patch 1071 BLAKE2B 1957d49b0c3c1f9db24add59b8dd464c6ce8571ded2601cb259a0686938e4fb718b6affd99c366f6e8aa360f53034c0e7c231dd3518bcab84bb8d5a755c4ebb5 SHA512 a531b3ae4b73dcd03e6f3de3da4dbf1250e6a6d05ec052fa8ff412f65233b5fcd418a7128f9b913aa71e1bbf970ba5b74c7b407a0654e1030f695e7f13ebd5dc
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
+DIST rocm-smi-5.4.2.tar.gz 1553259 BLAKE2B 0560e115028caafb1d5dd8892cfa677431b792714ecd8c75f31451fa7685d1c7070cbd687c894d7eefd112de5e2df9aa7895aa57821db207dffc4e8890898638 SHA512 0fd651593df0ebbcb2c2327d030d2674efacdb6e883daa5a8adf733db2bde3e5d16dc304856221f4bb07a3cd834944ffcc7ebd689624f7ba24ffd6c262ba74b8
EBUILD rocm-smi-5.0.2.ebuild 1792 BLAKE2B 9a62e39ff01e7db4aa644d801d357685af916e70d3e9e9a2eb955277125bbad9ed80645a9398a2f666eafd5212de0b8705a2edc66e0994b15565710bf26e25ef SHA512 bee3dcc8be502c1e103aa17236144b2cc15dea47bc5764178978d41edd727c242c5a524142f6c2c1ab234d38d3551cdc57330e2a6a83fabce44835be55f65cc6
-EBUILD rocm-smi-5.1.3.ebuild 1847 BLAKE2B 90d7228651a4b654f7f3feb5d5a8d2df1a9ef50e77acf287a7cdff68bae007e4e6d4ddd8e9f9de75a78433d4e78c8ba52b60a6de556e2906f624794759b58d9f SHA512 3355d38aa70c761c99cbece2d1f3109d7b2f17d1a60327a891475899b25aee169970b4ccaf1b4236737127a5db49ec3469d495f3073b5c1ea3bce9a4be2364ee
-EBUILD rocm-smi-9999.ebuild 1705 BLAKE2B 82dc6c969a80f06b10e0175efa7fb0b28f7a1acece3d7b19b092cb78f06a2e376782f3fec0ac849421a974baf3c9e7fc9775a08d0ab3a173ca4e63c3f689b0c1 SHA512 07efc2a0abbdb8c884659ca86ef5efafd8610fced923ee9b36494d6ddd3839df9991f364ef22d5e80f66dcc656f4e13a194aad67cc5d49b53b255de63fa6e9f2
+EBUILD rocm-smi-5.1.3-r1.ebuild 1850 BLAKE2B ca355e03af98c2af6426ba44e7282d346a5b668c8b9139d2e574bc87e8c2e2641227be849398d956cc9fa12d094016d6c6979849a6ef1c4fa0379c5b8839b3e9 SHA512 b3617a2c4bbfe9287b399d9bbbca898ac0b2fd977fd624f5357e74212a30915c28c7b3b8d656b02743a197d9ec5541e684a6aef24cd84815d12651adc46cc4a4
+EBUILD rocm-smi-5.4.2.ebuild 1454 BLAKE2B 1025768cbe75bb5d815631868c8d9f72ba6dd19a2a0483b0f6fa992a89af4b018731ab247df3679bb836e88e961d80cc94f6550dab70dc00ba25e3d642f5af74 SHA512 5e124efaa71e74ab5b5063244d757f8e9eddc22dbf10d1878c1a5d7ad04dbc88b366470596d4ee48bb489b26bb30e90f8fab51ca756fa0315e5a673971ae8d7e
+EBUILD rocm-smi-9999.ebuild 1454 BLAKE2B 1025768cbe75bb5d815631868c8d9f72ba6dd19a2a0483b0f6fa992a89af4b018731ab247df3679bb836e88e961d80cc94f6550dab70dc00ba25e3d642f5af74 SHA512 5e124efaa71e74ab5b5063244d757f8e9eddc22dbf10d1878c1a5d7ad04dbc88b366470596d4ee48bb489b26bb30e90f8fab51ca756fa0315e5a673971ae8d7e
MISC metadata.xml 661 BLAKE2B ed6ec563956132012b44907f348091135c7a463fc47a51ac0726e7749da9a4c33811df87442e576fb510799a50c14949cd20c8ca10a5850ee941a8794b70ef7d SHA512 c047963068b4ccefb73539ecd91b4c3310f0863a674acb15e9843dda7f0c917616dc8cbfe5f859e42d9ee25323bf1b66b1ce7fbe9a2e8292963ac38aa0bd72f3
diff --git a/dev-util/rocm-smi/files/rocm-smi-5.4.2-detect-builtin-amdgpu.patch b/dev-util/rocm-smi/files/rocm-smi-5.4.2-detect-builtin-amdgpu.patch
new file mode 100644
index 000000000000..1c406c7d042c
--- /dev/null
+++ b/dev-util/rocm-smi/files/rocm-smi-5.4.2-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(-)
+
+Index: rocm_smi_lib-rocm-5.4.2/python_smi_tools/rocm_smi.py
+===================================================================
+--- rocm_smi_lib-rocm-5.4.2.orig/python_smi_tools/rocm_smi.py
++++ rocm_smi_lib-rocm-5.4.2/python_smi_tools/rocm_smi.py
+@@ -66,7 +66,7 @@ def driverInitialized():
+ """
+ driverInitialized = ''
+ try:
+- driverInitialized = str(subprocess.check_output("cat /sys/module/amdgpu/initstate |grep live", 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-r1.ebuild
index 90b2396a727d..f2b4fc660707 100644
--- a/dev-util/rocm-smi/rocm-smi-5.1.3.ebuild
+++ b/dev-util/rocm-smi/rocm-smi-5.1.3-r1.ebuild
@@ -57,6 +57,6 @@ src_configure() {
src_install() {
cmake_src_install
- python_foreach_impl python_newexe python_smi_tools/rocm_smi.py rocm-smi
+ python_foreach_impl python_newscript python_smi_tools/rocm_smi.py rocm-smi
python_foreach_impl python_domodule python_smi_tools/rsmiBindings.py
}
diff --git a/dev-util/rocm-smi/rocm-smi-5.4.2.ebuild b/dev-util/rocm-smi/rocm-smi-5.4.2.ebuild
new file mode 100644
index 000000000000..bc4f8b802371
--- /dev/null
+++ b/dev-util/rocm-smi/rocm-smi-5.4.2.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+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.4.2-detect-builtin-amdgpu.patch
+)
+
+src_prepare() {
+ sed -e "/LICENSE.txt/d" -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
+ -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ python_foreach_impl python_newscript python_smi_tools/rocm_smi.py rocm-smi
+ python_foreach_impl python_domodule python_smi_tools/rsmiBindings.py
+}
diff --git a/dev-util/rocm-smi/rocm-smi-9999.ebuild b/dev-util/rocm-smi/rocm-smi-9999.ebuild
index 16c82ecdbbe5..bc4f8b802371 100644
--- a/dev-util/rocm-smi/rocm-smi-9999.ebuild
+++ b/dev-util/rocm-smi/rocm-smi-9999.ebuild
@@ -3,9 +3,9 @@
EAPI=8
-PYTHON_COMPAT=( python3_{9..10} )
+PYTHON_COMPAT=( python3_{9..11} )
-inherit cmake multilib prefix python-r1
+inherit cmake python-r1
DESCRIPTION="ROCm System Management Interface Library"
HOMEPAGE="https://github.com/RadeonOpenCompute/rocm_smi_lib"
@@ -20,7 +20,7 @@ else
S="${WORKDIR}/rocm_smi_lib-rocm-${PV}"
fi
-LICENSE="NCSA-AMD"
+LICENSE="MIT NCSA-AMD"
SLOT="0/$(ver_cut 1-2)"
IUSE=""
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
@@ -29,28 +29,29 @@ DEPEND=""
RDEPEND="${PYTHON_DEPS}"
BDEPEND=""
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.0.2-gcc12-memcpy.patch
+ "${FILESDIR}"/${PN}-5.4.2-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
+ sed -e "/LICENSE.txt/d" -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
+ -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF
)
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_newscript python_smi_tools/rocm_smi.py rocm-smi
python_foreach_impl python_domodule python_smi_tools/rsmiBindings.py
}