You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature Request: create SyclDevice and attribute to and from dlpack Enum in Python #1929
There is already functionality for converting SyclDevices into dlpack_device Enums (c_dlpack.get_parent_device_ordinal_id) occurring in Cython. dpctl Tensors also already include a __dlpack_device__, would it be possible to enhance operability with dlpack by including a __dlpack_device__ attribute to SyclDevice, and make a SyclDevice creator arg if passed a dlpack enum?
I've started work on this feature. Would it be sufficient for your needs for dpctl.tensor to expose two functions for interchanging a DLPack device with a SyclDevice or a dpctl.tensor.Device?
Activity
ndgrigorian commentedon Jan 2, 2025
I've started work on this feature. Would it be sufficient for your needs for
dpctl.tensorto expose two functions for interchanging a DLPack device with aSyclDeviceor adpctl.tensor.Device?Something like
and its converse (making a root
SyclDevicefrom a DLPack device type).This avoids creating a dependency between
dpctl.SyclDeviceand DLPack functionality, i.e., defining device type enumerators in thedpctlnamespace.