Skip to content

Commit

Permalink
Now that the C API function properly canonicalizes device ids extra l…
Browse files Browse the repository at this point in the history
…ogic in Cython may be removed.
  • Loading branch information
Diptorup Deb committed Oct 7, 2021
1 parent 0f494af commit 67c4993
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions dpctl/_sycl_device.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand Down

0 comments on commit 67c4993

Please sign in to comment.