Skip to content

Commit 530c6ea

Browse files
author
Diptorup Deb
committed
Fix compilation error properly this time.
1 parent 28efea3 commit 530c6ea

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dpctl/_sycl_device.pyx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,12 @@ cdef class _SyclDevice:
209209
return int(<size_t>self._device_ref)
210210

211211
@property
212-
def __name__():
212+
def __name__(self):
213213
return "SyclDevice"
214214

215+
def __repr__(self):
216+
return "<dpctl." + self.__name__ + " at {}>".format(hex(id(self)))
217+
215218

216219
cdef class SyclDevice(_SyclDevice):
217220
""" Python equivalent for cl::sycl::device class.

0 commit comments

Comments
 (0)