[L0] Backend context will contain all devices even if frontend context contains single device
Which will let the driver create extra allocations in certain scenarios. Should we use zeContextCreateEx instead of zeContextCreate?
https://github.com/intel/llvm/blob/ad880488f093333d93e4025573587f7d522e79d5/sycl/plugins/unified_runtime/ur/adapters/level_zero/context.cpp#L32
@CaoZhongZ : the devices exposed by the L0 driver vary depending on ZE_AFFINITY_MASK, while the devices exposed by the SYCL runtime are determined by ONEAPI_DEVICE_SELECTOR. Idea is that a SYCL user uses the ONEAPI_DEVICE_SELECTOR to select the devices that wants to use, and SYCL runtime filters those from all available from L0 (or the subset defined by ZE_AFFINITY_MASK).
Now, we could definitely make this safer by creating the L0 context only with a sub-set of the devices with the function you mentioned above. So far, we haven't gotten reports of issues (that I recall) that are not working correctly due to this, which is why we may have not added the support.
If you have a failed case, then we can prioritize adding this.
CC: @smaslov-intel , to confirm my understanding above.
Yes, the safer part is what I mean. We triggered other problem in backend, though it could be fixed but the performance would also be impaired a little bit.
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be automatically closed in 30 days.
This issue was closed because it has been stalled for 30 days with no activity. Please, re-open if the issue still exists.