2
0

Collect compute partition devices under the same socket

The socket represents a physical device, and the partition devices
should belong to the socket. The partition devices are only
different in function id in BDF. Use the BD part of the BDF to
identify a socket.

Change-Id: I5d355a6f5db02faa7555b760a36c7351b8d8d835


[ROCm/amdsmi commit: de7e74f7db]
Este cometimento está contido em:
Bill(Shuzhou) Liu
2023-11-29 08:23:23 -06:00
ascendente a8138bfd5e
cometimento 985ddbc5d5
2 ficheiros modificados com 13 adições e 6 eliminações
+6 -1
Ver ficheiro
@@ -99,7 +99,12 @@ class AMDSmiSystem {
#endif
private:
AMDSmiSystem() : init_flag_(AMDSMI_INIT_AMD_GPUS) {}
amdsmi_status_t get_gpu_bdf_by_index(uint32_t index, std::string& bdf);
/* The GPU socket id is used to identify the socket, so that the XCDs
on the same physical device will be collected under the same socket.
The BD part of the BDF is used as GPU socket to represent a phyiscal device.
*/
amdsmi_status_t get_gpu_socket_id(uint32_t index, std::string& socketid);
amdsmi_status_t populate_amd_gpu_devices();
uint64_t init_flag_;
AMDSmiDrm drm_;