diff --git a/dpctl/tensor/_dldevice_conversions.py b/dpctl/tensor/_dldevice_conversions.py index 3a43854896..bf10db189d 100644 --- a/dpctl/tensor/_dldevice_conversions.py +++ b/dpctl/tensor/_dldevice_conversions.py @@ -14,8 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import dpctl - +from .._sycl_device import SyclDevice from ._usmarray import DLDeviceType @@ -29,12 +28,12 @@ def dldevice_to_sycldevice(dl_dev: tuple): ) if dl_dev[0] != DLDeviceType.kDLOneAPI: raise ValueError("dldevice type must be kDLOneAPI") - return dpctl.SyclDevice(str(dl_dev[1])) + return SyclDevice(str(dl_dev[1])) -def sycldevice_to_dldevice(dev: dpctl.SyclDevice): - if not isinstance(dev, dpctl.SyclDevice): +def sycldevice_to_dldevice(dev: SyclDevice): + if not isinstance(dev, SyclDevice): raise TypeError( - "dev is expected to be a dpctl.SyclDevice, got " f"{type(dev)}" + "dev is expected to be a SyclDevice, got " f"{type(dev)}" ) return (DLDeviceType.kDLOneAPI, dev.get_device_id())