From 83a2b2fd2ab3f3802799211e30d1c7e12dee1836 Mon Sep 17 00:00:00 2001 From: Diptorup Deb Date: Wed, 6 Oct 2021 17:48:37 -0500 Subject: [PATCH] Now that the C API function properly canonicalizes device ids extra logic in Cython may be removed. --- dpctl/_sycl_device.pyx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dpctl/_sycl_device.pyx b/dpctl/_sycl_device.pyx index d56d355a10..70302e9937 100644 --- a/dpctl/_sycl_device.pyx +++ b/dpctl/_sycl_device.pyx @@ -1014,8 +1014,7 @@ cdef class SyclDevice(_SyclDevice): cdef int64_t relId = -1 DTy = DPCTLDevice_GetDeviceType(self._device_ref) - relId = DPCTLDeviceMgr_GetPositionInDevices( - self._device_ref, _backend_type._ALL_BACKENDS | DTy) + relId = DPCTLDeviceMgr_GetPositionInDevices(self._device_ref, DTy) return relId cdef int get_backend_ordinal(self): @@ -1032,8 +1031,7 @@ cdef class SyclDevice(_SyclDevice): cdef int64_t relId = -1 BTy = DPCTLDevice_GetBackend(self._device_ref) - relId = DPCTLDeviceMgr_GetPositionInDevices( - self._device_ref, BTy | _device_type._ALL_DEVICES) + relId = DPCTLDeviceMgr_GetPositionInDevices(self._device_ref, BTy) return relId cdef int get_overall_ordinal(self):