Catch exceptions from rocm-smi (#85)

Signed-off-by: coleramos425 <colramos@amd.com>


[ROCm/rocprofiler-compute commit: f77173a2f1]
This commit is contained in:
coleramos425
2023-02-21 09:47:45 -06:00
parent d8910f7e1e
commit b0bcc846aa
@@ -216,6 +216,10 @@ def get_machine_specs(devicenum):
) = gpuinfo()
rocm_smi = run(["rocm-smi"])
if search(r"ERROR(\S*)", rocm_smi) != None:
print("ERROR: No GPU detected. Unable to load rocm-smi")
sys.exit(1)
device = rf"^\s*{devicenum}(.*)"
hostname = socket.gethostname()