summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYiyang Wu <xgreenlandforwyy@gmail.com>2022-07-11 17:04:21 +0800
committerBenda Xu <heroxbd@gentoo.org>2022-08-06 22:22:24 +0800
commitc1198ee528b9f90cca1f63baecf16c8dbd0741e6 (patch)
treec3bda9feb405c5a121eab25575159eaa3f026add /dev-util/rocm-smi/files
parentdev-util/hip: add 5.1.3 (diff)
downloadgentoo-c1198ee528b9f90cca1f63baecf16c8dbd0741e6.tar.gz
gentoo-c1198ee528b9f90cca1f63baecf16c8dbd0741e6.tar.bz2
gentoo-c1198ee528b9f90cca1f63baecf16c8dbd0741e6.zip
dev-util/rocm-smi: add 5.1.3
Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com> Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'dev-util/rocm-smi/files')
-rw-r--r--dev-util/rocm-smi/files/rocm-smi-5.1.3-detect-builtin-amdgpu.patch26
1 files changed, 26 insertions, 0 deletions
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: