Skip to content

Commit b63e01e

Browse files
author
Diptorup Deb
committed
Now that the C API function properly canonicalizes device ids extra logic in Cython may be removed.
1 parent a240902 commit b63e01e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

dpctl/_sycl_device.pyx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,8 +1014,7 @@ cdef class SyclDevice(_SyclDevice):
10141014
cdef int64_t relId = -1
10151015

10161016
DTy = DPCTLDevice_GetDeviceType(self._device_ref)
1017-
relId = DPCTLDeviceMgr_GetPositionInDevices(
1018-
self._device_ref, _backend_type._ALL_BACKENDS | DTy)
1017+
relId = DPCTLDeviceMgr_GetPositionInDevices(self._device_ref, DTy)
10191018
return relId
10201019

10211020
cdef int get_backend_ordinal(self):
@@ -1032,8 +1031,7 @@ cdef class SyclDevice(_SyclDevice):
10321031
cdef int64_t relId = -1
10331032

10341033
BTy = DPCTLDevice_GetBackend(self._device_ref)
1035-
relId = DPCTLDeviceMgr_GetPositionInDevices(
1036-
self._device_ref, BTy | _device_type._ALL_DEVICES)
1034+
relId = DPCTLDeviceMgr_GetPositionInDevices(self._device_ref, BTy)
10371035
return relId
10381036

10391037
cdef int get_overall_ordinal(self):

0 commit comments

Comments
 (0)