[TOOLS] Update rcclDiagnostics script (#1557)

* [TOOLS] Update rcclDiagnostics script

Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>

* Fix typo in valid_marketing_names list

Co-authored-by: corey-derochie-amd <161367113+corey-derochie-amd@users.noreply.github.com>

---------

Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>
Co-authored-by: corey-derochie-amd <161367113+corey-derochie-amd@users.noreply.github.com>
Tento commit je obsažen v:
Nilesh M Negi
2025-02-20 16:11:05 -06:00
odevzdal GitHub
rodič aedbc95735
revize 159587be5c
+13 -9
Zobrazit soubor
@@ -347,21 +347,25 @@ def get_rocminfo():
gpu_pattern = re.compile(r"Name:\s+(gfx\d+)(?:.*?Marketing Name:\s+([^\n]+))?.*?Compute Unit:\s+(\d+)", re.DOTALL)
matches = gpu_pattern.findall(result.stdout)
num_gpus = len(matches)
valid_marketing_names = ["MI300X", "MI200", "MI300A", "MI308"]
valid_marketing_names = ["MI300X", "MI300A", "MI300", "MI250X/MI250", "MI200"]
gpu_name = ""
for name in valid_marketing_names:
if name in matches[0][1]:
gpu_name = name
break
if gpu_name == "":
if "gfx942" == matches[0][0] and 304 == int(matches[0][2]):
gpu_name = "MI300X"
elif "gfx942" == matches[0][0] and 80 == int(matches[0][2]):
gpu_name = "MI308"
elif "gfx942" == matches[0][0] and 228 == int(matches[0][2]):
gpu_name = "MI300A"
elif "gfx90a" == matches[0][0] and 228 == int(matches[0][2]):
gpu_name = "MI200"
if "gfx942" == matches[0][0]:
if 304 == int(matches[0][2]):
gpu_name = "MI300X"
elif 228 == int(matches[0][2]):
gpu_name = "MI300A"
else:
gpu_name = f"MI300 with {int(matches[0][2])} CUs"
elif "gfx90a" == matches[0][0]:
if 104 <= int(matches[0][2]):
gpu_name = "MI250X/MI250"
else:
gpu_name = f"MI200 with {int(matches[0][2])} CUs"
summary = f"Found {num_gpus} {gpu_name} GPUs"
else:
summary = "Unable to detect"