Use amd-smi Python API instead of CLI (#1334)
* Use amd-smi Python API instead of CLI Formatting fix python path * Update CHANGELOG * Create amdsmi interface * Added amdsmi tests * Removed run * Prioritize rocm's amdsmi python API * address review comments * update changelog * fix ruff formatting --------- Co-authored-by: Vignesh Edithal <Vignesh.Edithal@amd.com>
This commit is contained in:
@@ -57,14 +57,6 @@ MI300_CHIP_IDS = {
|
||||
}
|
||||
|
||||
|
||||
def run(cmd):
|
||||
p = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
if cmd[0] == "amd-smi" and p.returncode == 8:
|
||||
print("ERROR: No GPU detected. Unable to load amd-smi")
|
||||
assert 0
|
||||
return p.stdout.decode("ascii")
|
||||
|
||||
|
||||
def gpu_soc():
|
||||
## 1) Parse arch details from rocminfo
|
||||
rocminfo = str(
|
||||
|
||||
Reference in New Issue
Block a user