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:
@@ -92,14 +92,6 @@ def parse_table_dict(output: str) -> dict:
|
||||
return result
|
||||
|
||||
|
||||
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("utf-8")
|
||||
|
||||
|
||||
def get_num_xcds():
|
||||
num_xcds = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user