ROCm / rocm_smi_lib

ROCm SMI LIB
https://rocm.docs.amd.com/projects/rocm_smi_lib/en/latest/
MIT License
111 stars 48 forks source link

[Feature]: Resolve PCIIDs to strings #159

Open dcsouthwick opened 3 months ago

dcsouthwick commented 3 months ago

Suggestion Description

Hello,

I come with some humble quality-of-life requests to make using rocm-smi easier on users that might need to rely on scripting output. I hope this is an OK place to request this.

It would be very helpful if product name either resolved the PCIID to a string, or at least give the full pci-id so that users might do it themselves. Currently, rocm-smi is a mixture of strings, hex, and int:

rocm-smi <various args> --showproductname --json

{
  "card0": {
    "Card Series": "AMD INSTINCT MI200 (MCM) OAM LC MBA HPE C2",
    "Card Model": "0x7408",
    "Card Vendor": "Advanced Micro Devices, Inc. [AMD/ATI]",
    "Card SKU": "D65201",
    "Subsystem ID": "0x0b0c",
    "Device Rev": "0x00",
    "Node ID": "7",
    "GUID": "58294",
    "GFX Version": "gfx9010"
  }
}

Would be nice if instead it might resolve, or just use all hex:

{
  "card0": {
    "Card Series": "AMD INSTINCT MI200 (MCM) OAM LC MBA HPE C2",
    "Card Model": "Instinct MI250X",
    "Card Vendor": "Advanced Micro Devices, Inc. [AMD/ATI]",
    "Card SKU": "D65201",

    # or just hex
    "Device ID": "1002:7408",
    "Subsystem ID": "1002:0b0c",
    "Device Rev": "0",
    "Node ID": "7",
    "GUID": "58294",
    "GFX Version": "gfx9010"
  }
}

Similar arguments for other fields (one example) "socclk clock speed:": "(1090Mhz)" -> "socclk clock speed:": "1090 MHz"

Thanks for your otherwise nice additions so far!

Operating System

No response

GPU

No response

ROCm Component

No response