Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
dpctl-capi/:
DPCTLDeviceMgr_GetPositionInDevices(DRef, device_mask)
that returns ordinal of the given DRef in the filtered vector returned bysycl::device::get_devices()
, or -1 if not found (e.g.DRef
points to a sub-device).dpctl/:
DPCTLDeviceMgr_GetPositionInDevices
to_backend.pxd
dpctl.SyclDevice
:get_overall_ordinal(self)
- index in unfiltered vector returned byget_devices()
.get_backend_ordinal(self)
- index in vector filtered to only contain devices with the backend of this deviceget_device_type_ordinal(self)
- index in vector filtered to only contain devices with device_type as in this deviceget_backend_and_device_type_ordinal(self)
- indexed in vector filtered to only contain devices with device_type and backend of this device* Added Python visible method
get_filter_string(self, include_backend=True, include_device_type=True)
which producer filter selector string selecting this device that would include or omit backend/device_type as requested.* Test added
Example: