oneapi-src / level-zero-spec

MIT License
18 stars 27 forks source link

Need APIs to help map Flat model device handles to sysman device handles and vice versa #243

Closed AshwinKumarKulkarni closed 9 months ago

AshwinKumarKulkarni commented 1 year ago

Problem: The user experience is not consistent with core enabling Flat mode and sysman using composite. When end users run one workload on GPU 2 in Flat mode and want to check the GPU 2 telemetry to tune the workload, currently it is difficult to detect corresponding sysman device handle to analyze sysman results since sysman always operates in composite mode.

Proposal:

APIs:

zesDeviceGetByUUID(zes_driver_handle_t phDriver, zes_uuid_t uuid, zes_device_handle_t phDevice, zes_device_description_t); phDriver - syamn device handle(input) uuid - UUID retrieved with core device handle(input) phDevice - output. (Root device handle if uuid is subdevice) zes_device_description_t* - output zes_device_description_t{ stype, pnext, onsubdevice, subdeviceId }

zesDeviceGetSubDeviceUUID(pDevice, subdevice Index, &uuid) pDevice - sysman root device handle(input) Index - sub device index(input) uuid – uuid(output)

Description: Given UUID of core device handle,1st API can return root device handle and tile/sub device Index. Also, Given sysman device handle and sub device Index, 2nd API can return UUID.