I would like to dump dump device properties in json format, but xpu-smi do not work well
e.g. command is xpu-smi discovery -j --dump 2, the output is:
{
"device_list": [
{
"amc_firmware_name": "AMC",
"amc_firmware_version": "",
"core_clock_rate_mhz": "2400",
"device_id": 0,
"device_name": "Intel(R) Graphics [0xe211]",
"device_stepping": "A0",
"device_type": "GPU",
"driver_version": "7B7A46009E666C4D10E1134",
"drm_device": "/dev/dri/card0",
"gfx_data_firmware_name": "GFX_DATA",
"gfx_data_firmware_version": "0x13",
"gfx_firmware_name": "GFX",
"gfx_firmware_status": "normal",
"gfx_firmware_version": "BMG__21.1180",
"gfx_pscbin_firmware_name": "GFX_PSCBIN",
"gfx_pscbin_firmware_version": "",
"kernel_version": "6.14.0-1008-intel",
"max_command_queue_priority": "0",
"max_hardware_contexts": "65536",
"max_mem_alloc_size_byte": "24385683456",
"memory_bus_width": "128",
"memory_ecc_state": "disabled",
"memory_free_size_byte": "25447600128",
"memory_physical_size_byte": "25669140480",
"number_of_eus": "160",
"number_of_eus_per_sub_slice": "8",
"number_of_media_engines": "2",
"number_of_media_enh_engines": "2",
"number_of_memory_channels": "4",
"number_of_slices": "5",
"number_of_sub_slices_per_slice": "4",
"number_of_threads_per_eu": "8",
"number_of_tiles": "1",
"oprom_code_firmware_name": "OPROM_CODE",
"oprom_code_firmware_version": "17 0 2a 4 0 0 0 0 ",
"oprom_data_firmware_name": "OPROM_DATA",
"oprom_data_firmware_version": "17 0 2a 4 0 0 0 0 ",
"pci_bdf_address": "0000:4e:00.0",
"pci_device_id": "0xe211",
"pci_slot": "J2D3 - MCIO (X4_CPU0PE3), slot 8",
"pci_vendor_id": "0x8086",
"pcie_generation": "5",
"pcie_max_bandwidth": "31.51 GB/s",
"pcie_max_link_width": "8",
"physical_eu_simd_width": "16",
"serial_number": "unknown",
"sku_type": "Production PRQ",
"uuid": "00000000-0000-004e-0000-0000e2118086",
"vendor_name": "Intel(R) Corporation"
},
{
"amc_firmware_name": "AMC",
"amc_firmware_version": "",
"core_clock_rate_mhz": "2400",
"device_id": 1,
"device_name": "Intel(R) Graphics [0xe211]",
"device_stepping": "A0",
"device_type": "GPU",
"driver_version": "7B7A46009E666C4D10E1134",
"drm_device": "/dev/dri/card2",
"gfx_data_firmware_name": "GFX_DATA",
"gfx_data_firmware_version": "0x13",
"gfx_firmware_name": "GFX",
"gfx_firmware_status": "normal",
"gfx_firmware_version": "BMG__21.1180",
"gfx_pscbin_firmware_name": "GFX_PSCBIN",
"gfx_pscbin_firmware_version": "",
"kernel_version": "6.14.0-1008-intel",
"max_command_queue_priority": "0",
"max_hardware_contexts": "65536",
"max_mem_alloc_size_byte": "24385683456",
"memory_bus_width": "128",
"memory_ecc_state": "disabled",
"memory_free_size_byte": "25447600128",
"memory_physical_size_byte": "25669140480",
"number_of_eus": "160",
"number_of_eus_per_sub_slice": "8",
"number_of_media_engines": "2",
"number_of_media_enh_engines": "2",
"number_of_memory_channels": "4",
"number_of_slices": "5",
"number_of_sub_slices_per_slice": "4",
"number_of_threads_per_eu": "8",
"number_of_tiles": "1",
"oprom_code_firmware_name": "OPROM_CODE",
"oprom_code_firmware_version": "17 0 2a 4 0 0 0 0 ",
"oprom_data_firmware_name": "OPROM_DATA",
"oprom_data_firmware_version": "17 0 2a 4 0 0 0 0 ",
"pci_bdf_address": "0000:70:00.0",
"pci_device_id": "0xe211",
"pci_slot": "J1K2 - MCIO (X4_CPU0PE5), slot 16",
"pci_vendor_id": "0x8086",
"pcie_generation": "5",
"pcie_max_bandwidth": "31.51 GB/s",
"pcie_max_link_width": "8",
"physical_eu_simd_width": "16",
"serial_number": "unknown",
"sku_type": "Production PRQ",
"uuid": "00000000-0000-0070-0000-0000e2118086",
"vendor_name": "Intel(R) Corporation"
},
{
"amc_firmware_name": "AMC",
"amc_firmware_version": "",
"core_clock_rate_mhz": "2400",
"device_id": 2,
"device_name": "Intel(R) Graphics [0xe211]",
"device_stepping": "A0",
"device_type": "GPU",
"driver_version": "7B7A46009E666C4D10E1134",
"drm_device": "/dev/dri/card3",
"gfx_data_firmware_name": "GFX_DATA",
"gfx_data_firmware_version": "0x1",
"gfx_firmware_name": "GFX",
"gfx_firmware_status": "normal",
"gfx_firmware_version": "BMG__21.1156",
"gfx_pscbin_firmware_name": "GFX_PSCBIN",
"gfx_pscbin_firmware_version": "",
"kernel_version": "6.14.0-1008-intel",
"max_command_queue_priority": "0",
"max_hardware_contexts": "65536",
"max_mem_alloc_size_byte": "24385683456",
"memory_bus_width": "64",
"memory_ecc_state": "",
"memory_free_size_byte": "25447604224",
"memory_physical_size_byte": "25669140480",
"number_of_eus": "160",
"number_of_eus_per_sub_slice": "8",
"number_of_media_engines": "2",
"number_of_media_enh_engines": "2",
"number_of_memory_channels": "2",
"number_of_slices": "5",
"number_of_sub_slices_per_slice": "4",
"number_of_threads_per_eu": "8",
"number_of_tiles": "1",
"oprom_code_firmware_name": "OPROM_CODE",
"oprom_code_firmware_version": "17 0 22 4 0 0 0 0 ",
"oprom_data_firmware_name": "OPROM_DATA",
"oprom_data_firmware_version": "17 0 22 4 0 0 0 0 ",
"pci_bdf_address": "0000:97:00.0",
"pci_device_id": "0xe211",
"pci_slot": "J9E1 - MCIO (X4_CPU1PE0), slot 1",
"pci_vendor_id": "0x8086",
"pcie_generation": "5",
"pcie_max_bandwidth": "31.51 GB/s",
"pcie_max_link_width": "8",
"physical_eu_simd_width": "16",
"serial_number": "unknown",
"sku_type": "Production PRQ",
"uuid": "00000000-0000-0097-0000-0000e2118086",
"vendor_name": "Intel(R) Corporation"
},
{
"amc_firmware_name": "AMC",
"amc_firmware_version": "",
"core_clock_rate_mhz": "2400",
"device_id": 3,
"device_name": "Intel(R) Graphics [0xe211]",
"device_stepping": "A0",
"device_type": "GPU",
"driver_version": "7B7A46009E666C4D10E1134",
"drm_device": "/dev/dri/card4",
"gfx_data_firmware_name": "GFX_DATA",
"gfx_data_firmware_version": "0x1",
"gfx_firmware_name": "GFX",
"gfx_firmware_status": "normal",
"gfx_firmware_version": "BMG__21.1156",
"gfx_pscbin_firmware_name": "GFX_PSCBIN",
"gfx_pscbin_firmware_version": "",
"kernel_version": "6.14.0-1008-intel",
"max_command_queue_priority": "0",
"max_hardware_contexts": "65536",
"max_mem_alloc_size_byte": "24385683456",
"memory_bus_width": "64",
"memory_ecc_state": "",
"memory_free_size_byte": "25449357312",
"memory_physical_size_byte": "25669140480",
"number_of_eus": "160",
"number_of_eus_per_sub_slice": "8",
"number_of_media_engines": "2",
"number_of_media_enh_engines": "2",
"number_of_memory_channels": "2",
"number_of_slices": "5",
"number_of_sub_slices_per_slice": "4",
"number_of_threads_per_eu": "8",
"number_of_tiles": "1",
"oprom_code_firmware_name": "OPROM_CODE",
"oprom_code_firmware_version": "17 0 22 4 0 0 0 0 ",
"oprom_data_firmware_name": "OPROM_DATA",
"oprom_data_firmware_version": "17 0 22 4 0 0 0 0 ",
"pci_bdf_address": "0000:ed:00.0",
"pci_device_id": "0xe211",
"pci_slot": "J6K3 - MCIO (X4_CPU1PE5), slot 12",
"pci_vendor_id": "0x8086",
"pcie_generation": "5",
"pcie_max_bandwidth": "31.51 GB/s",
"pcie_max_link_width": "8",
"physical_eu_simd_width": "16",
"serial_number": "unknown",
"sku_type": "Production PRQ",
"uuid": "00000000-0000-00ed-0000-0000e2118086",
"vendor_name": "Intel(R) Corporation"
}
]
}
I would like to dump dump device properties in json format, but xpu-smi do not work well
e.g. command is xpu-smi discovery -j --dump 2, the output is:
{ "device_list": [ { "amc_firmware_name": "AMC", "amc_firmware_version": "", "core_clock_rate_mhz": "2400", "device_id": 0, "device_name": "Intel(R) Graphics [0xe211]", "device_stepping": "A0", "device_type": "GPU", "driver_version": "7B7A46009E666C4D10E1134", "drm_device": "/dev/dri/card0", "gfx_data_firmware_name": "GFX_DATA", "gfx_data_firmware_version": "0x13", "gfx_firmware_name": "GFX", "gfx_firmware_status": "normal", "gfx_firmware_version": "BMG__21.1180", "gfx_pscbin_firmware_name": "GFX_PSCBIN", "gfx_pscbin_firmware_version": "", "kernel_version": "6.14.0-1008-intel", "max_command_queue_priority": "0", "max_hardware_contexts": "65536", "max_mem_alloc_size_byte": "24385683456", "memory_bus_width": "128", "memory_ecc_state": "disabled", "memory_free_size_byte": "25447600128", "memory_physical_size_byte": "25669140480", "number_of_eus": "160", "number_of_eus_per_sub_slice": "8", "number_of_media_engines": "2", "number_of_media_enh_engines": "2", "number_of_memory_channels": "4", "number_of_slices": "5", "number_of_sub_slices_per_slice": "4", "number_of_threads_per_eu": "8", "number_of_tiles": "1", "oprom_code_firmware_name": "OPROM_CODE", "oprom_code_firmware_version": "17 0 2a 4 0 0 0 0 ", "oprom_data_firmware_name": "OPROM_DATA", "oprom_data_firmware_version": "17 0 2a 4 0 0 0 0 ", "pci_bdf_address": "0000:4e:00.0", "pci_device_id": "0xe211", "pci_slot": "J2D3 - MCIO (X4_CPU0PE3), slot 8", "pci_vendor_id": "0x8086", "pcie_generation": "5", "pcie_max_bandwidth": "31.51 GB/s", "pcie_max_link_width": "8", "physical_eu_simd_width": "16", "serial_number": "unknown", "sku_type": "Production PRQ", "uuid": "00000000-0000-004e-0000-0000e2118086", "vendor_name": "Intel(R) Corporation" }, { "amc_firmware_name": "AMC", "amc_firmware_version": "", "core_clock_rate_mhz": "2400", "device_id": 1, "device_name": "Intel(R) Graphics [0xe211]", "device_stepping": "A0", "device_type": "GPU", "driver_version": "7B7A46009E666C4D10E1134", "drm_device": "/dev/dri/card2", "gfx_data_firmware_name": "GFX_DATA", "gfx_data_firmware_version": "0x13", "gfx_firmware_name": "GFX", "gfx_firmware_status": "normal", "gfx_firmware_version": "BMG__21.1180", "gfx_pscbin_firmware_name": "GFX_PSCBIN", "gfx_pscbin_firmware_version": "", "kernel_version": "6.14.0-1008-intel", "max_command_queue_priority": "0", "max_hardware_contexts": "65536", "max_mem_alloc_size_byte": "24385683456", "memory_bus_width": "128", "memory_ecc_state": "disabled", "memory_free_size_byte": "25447600128", "memory_physical_size_byte": "25669140480", "number_of_eus": "160", "number_of_eus_per_sub_slice": "8", "number_of_media_engines": "2", "number_of_media_enh_engines": "2", "number_of_memory_channels": "4", "number_of_slices": "5", "number_of_sub_slices_per_slice": "4", "number_of_threads_per_eu": "8", "number_of_tiles": "1", "oprom_code_firmware_name": "OPROM_CODE", "oprom_code_firmware_version": "17 0 2a 4 0 0 0 0 ", "oprom_data_firmware_name": "OPROM_DATA", "oprom_data_firmware_version": "17 0 2a 4 0 0 0 0 ", "pci_bdf_address": "0000:70:00.0", "pci_device_id": "0xe211", "pci_slot": "J1K2 - MCIO (X4_CPU0PE5), slot 16", "pci_vendor_id": "0x8086", "pcie_generation": "5", "pcie_max_bandwidth": "31.51 GB/s", "pcie_max_link_width": "8", "physical_eu_simd_width": "16", "serial_number": "unknown", "sku_type": "Production PRQ", "uuid": "00000000-0000-0070-0000-0000e2118086", "vendor_name": "Intel(R) Corporation" }, { "amc_firmware_name": "AMC", "amc_firmware_version": "", "core_clock_rate_mhz": "2400", "device_id": 2, "device_name": "Intel(R) Graphics [0xe211]", "device_stepping": "A0", "device_type": "GPU", "driver_version": "7B7A46009E666C4D10E1134", "drm_device": "/dev/dri/card3", "gfx_data_firmware_name": "GFX_DATA", "gfx_data_firmware_version": "0x1", "gfx_firmware_name": "GFX", "gfx_firmware_status": "normal", "gfx_firmware_version": "BMG__21.1156", "gfx_pscbin_firmware_name": "GFX_PSCBIN", "gfx_pscbin_firmware_version": "", "kernel_version": "6.14.0-1008-intel", "max_command_queue_priority": "0", "max_hardware_contexts": "65536", "max_mem_alloc_size_byte": "24385683456", "memory_bus_width": "64", "memory_ecc_state": "", "memory_free_size_byte": "25447604224", "memory_physical_size_byte": "25669140480", "number_of_eus": "160", "number_of_eus_per_sub_slice": "8", "number_of_media_engines": "2", "number_of_media_enh_engines": "2", "number_of_memory_channels": "2", "number_of_slices": "5", "number_of_sub_slices_per_slice": "4", "number_of_threads_per_eu": "8", "number_of_tiles": "1", "oprom_code_firmware_name": "OPROM_CODE", "oprom_code_firmware_version": "17 0 22 4 0 0 0 0 ", "oprom_data_firmware_name": "OPROM_DATA", "oprom_data_firmware_version": "17 0 22 4 0 0 0 0 ", "pci_bdf_address": "0000:97:00.0", "pci_device_id": "0xe211", "pci_slot": "J9E1 - MCIO (X4_CPU1PE0), slot 1", "pci_vendor_id": "0x8086", "pcie_generation": "5", "pcie_max_bandwidth": "31.51 GB/s", "pcie_max_link_width": "8", "physical_eu_simd_width": "16", "serial_number": "unknown", "sku_type": "Production PRQ", "uuid": "00000000-0000-0097-0000-0000e2118086", "vendor_name": "Intel(R) Corporation" }, { "amc_firmware_name": "AMC", "amc_firmware_version": "", "core_clock_rate_mhz": "2400", "device_id": 3, "device_name": "Intel(R) Graphics [0xe211]", "device_stepping": "A0", "device_type": "GPU", "driver_version": "7B7A46009E666C4D10E1134", "drm_device": "/dev/dri/card4", "gfx_data_firmware_name": "GFX_DATA", "gfx_data_firmware_version": "0x1", "gfx_firmware_name": "GFX", "gfx_firmware_status": "normal", "gfx_firmware_version": "BMG__21.1156", "gfx_pscbin_firmware_name": "GFX_PSCBIN", "gfx_pscbin_firmware_version": "", "kernel_version": "6.14.0-1008-intel", "max_command_queue_priority": "0", "max_hardware_contexts": "65536", "max_mem_alloc_size_byte": "24385683456", "memory_bus_width": "64", "memory_ecc_state": "", "memory_free_size_byte": "25449357312", "memory_physical_size_byte": "25669140480", "number_of_eus": "160", "number_of_eus_per_sub_slice": "8", "number_of_media_engines": "2", "number_of_media_enh_engines": "2", "number_of_memory_channels": "2", "number_of_slices": "5", "number_of_sub_slices_per_slice": "4", "number_of_threads_per_eu": "8", "number_of_tiles": "1", "oprom_code_firmware_name": "OPROM_CODE", "oprom_code_firmware_version": "17 0 22 4 0 0 0 0 ", "oprom_data_firmware_name": "OPROM_DATA", "oprom_data_firmware_version": "17 0 22 4 0 0 0 0 ", "pci_bdf_address": "0000:ed:00.0", "pci_device_id": "0xe211", "pci_slot": "J6K3 - MCIO (X4_CPU1PE5), slot 12", "pci_vendor_id": "0x8086", "pcie_generation": "5", "pcie_max_bandwidth": "31.51 GB/s", "pcie_max_link_width": "8", "physical_eu_simd_width": "16", "serial_number": "unknown", "sku_type": "Production PRQ", "uuid": "00000000-0000-00ed-0000-0000e2118086", "vendor_name": "Intel(R) Corporation" } ] }expected output is:
{ "device_list": [ { "device_name": "Intel(R) Graphics [0xe211]", }, { "device_name": "Intel(R) Graphics [0xe211]", }, { "device_name": "Intel(R) Graphics [0xe211]", }, { "device_name": "Intel(R) Graphics [0xe211]", } ] }