Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dpctl/_sycl_device.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ cdef class SyclDevice(_SyclDevice):
@staticmethod
cdef SyclDevice _create(DPCTLSyclDeviceRef dref)
@staticmethod
cdef void _init_helper(SyclDevice device, DPCTLSyclDeviceRef DRef)
cdef void _init_helper(_SyclDevice device, DPCTLSyclDeviceRef DRef)
cdef int _init_from__SyclDevice(self, _SyclDevice other)
cdef int _init_from_selector(self, DPCTLSyclDeviceSelectorRef DSRef)
cdef DPCTLSyclDeviceRef get_device_ref(self)
9 changes: 5 additions & 4 deletions dpctl/_sycl_device.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ cdef class SyclDevice(_SyclDevice):

"""
@staticmethod
cdef void _init_helper(SyclDevice device, DPCTLSyclDeviceRef DRef):
cdef void _init_helper(_SyclDevice device, DPCTLSyclDeviceRef DRef):
device._device_ref = DRef
device._device_name = DPCTLDevice_GetName(DRef)
device._driver_version = DPCTLDevice_GetDriverInfo(DRef)
Expand All @@ -132,9 +132,9 @@ cdef class SyclDevice(_SyclDevice):

@staticmethod
cdef SyclDevice _create(DPCTLSyclDeviceRef dref):
cdef SyclDevice ret = <SyclDevice>_SyclDevice.__new__(_SyclDevice)
cdef _SyclDevice ret = _SyclDevice.__new__(_SyclDevice)
# Initialize the attributes of the SyclDevice object
SyclDevice._init_helper(ret, dref)
SyclDevice._init_helper(<_SyclDevice> ret, dref)
return SyclDevice(ret)

cdef int _init_from__SyclDevice(self, _SyclDevice other):
Expand All @@ -147,6 +147,7 @@ cdef class SyclDevice(_SyclDevice):
DPCTLDevice_GetMaxWorkItemSizes(self._device_ref)
)
self._vendor_name = DPCTLDevice_GetVendorName(self._device_ref)
return 0

cdef int _init_from_selector(self, DPCTLSyclDeviceSelectorRef DSRef):
# Initialize the attributes of the SyclDevice object
Expand Down Expand Up @@ -221,7 +222,7 @@ cdef class SyclDevice(_SyclDevice):
int: The address of the DPCTLSyclDeviceRef object used to create
this SyclDevice cast to a size_t.
"""
return int(<size_t>self._device_ref)
return <size_t>self._device_ref
Comment thread
diptorupd marked this conversation as resolved.

@property
def backend(self):
Expand Down