oneapi-src / level-zero-spec

MIT License
18 stars 27 forks source link

Add mechanism to retrieve uuid in Sysman for each Sysman module #238

Closed aravindksg closed 1 year ago

aravindksg commented 1 year ago

Currently we have zes_uuid_t as part of zes_device_ext_properties_t, however, with zesInit approach, Sysman is disengaged from Core and is free to enumerate devices independently of Core. Therefore there could be discrepancies in device hierarchy model exposed by Core vs Sysman.

Sysman is also free to enumerate "handles" for each Sysman module independently. i.e, if there are handles to be exposed for root device and subdevices, then Sysman could expose multiple handles and set onSubdevice and subdeviceId members in the respective property structures (example: zes_freq_properties_t)

Now, if there is discrepancy between Core device hierarchy and Sysman then only way for user to correlate the handles is via device/sub-device uuid.

So we need a new mechanism to expose such info to user. Some thoughts:

  1. Add new extension struct per Sysman module that is attached to pNext of those modules just to expose uuid info
  2. Add new API entrypoint. something like zesDeviceGetUuid(ze_device_handle_t hDevice, bool onSubdevice, uint32_t subDeviceId, ze_uuid_t uuid); . uuid is out arg, while all other are input
  3. new API possibly to Get sub-device handles via Sysman
saik-intel commented 1 year ago

It’s duplicate of issue https://github.com/oneapi-src/level-zero-spec/issues/111 @jandres742 @wdamon-intel please close this issue

wdamon-intel commented 1 year ago

Closing as duplicate of #111 per @saik-intel