Skip to content

Commit

Permalink
Check /sys/module/amdgpu for ROCk instead of lsmod
Browse files Browse the repository at this point in the history
Closes: #102

Signed-off-by: YiyangWu <xgreenlandforwyy@gmail.com>
  • Loading branch information
littlewu2508 committed Apr 2, 2022
1 parent bd95425 commit dc2a4b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python_smi_tools/rocm_smi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit dc2a4b5

Please sign in to comment.