Skip to content

Commit 28efea3

Browse files
author
Diptorup Deb
committed
Fix compilation error.
1 parent c6767ca commit 28efea3

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

dpctl/_sycl_device.pyx

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,16 @@ cdef class _SyclDevice:
7474
DPCTLCString_Delete(self._driver_version)
7575
DPCTLSize_t_Array_Delete(self._max_work_item_sizes)
7676

77-
7877
def dump_device_info(self):
7978
""" Print information about the SYCL device.
8079
"""
8180
DPCTLDevice_DumpInfo(self._device_ref)
8281

83-
8482
cpdef get_device_name(self):
8583
""" Returns the name of the device as a string
8684
"""
8785
return self._device_name.decode()
8886

89-
9087
cpdef get_device_type(self):
9188
""" Returns the type of the device as a `device_type` enum
9289
"""
@@ -97,13 +94,11 @@ cdef class _SyclDevice:
9794
else:
9895
raise ValueError("Unknown device type.")
9996

100-
10197
cpdef get_vendor_name(self):
10298
""" Returns the device vendor name as a string
10399
"""
104100
return self._vendor_name.decode()
105101

106-
107102
cpdef get_driver_version(self):
108103
""" Returns the OpenCL software driver version as a string
109104
in the form: major number.minor number, if this SYCL
@@ -112,26 +107,22 @@ cdef class _SyclDevice:
112107
"""
113108
return self._driver_version.decode()
114109

115-
116110
cpdef has_int64_base_atomics(self):
117111
""" Returns true if device has int64_base_atomics else returns false.
118112
"""
119113
return self._int64_base_atomics
120114

121-
122115
cpdef has_int64_extended_atomics(self):
123116
""" Returns true if device has int64_extended_atomics else returns false.
124117
"""
125118
return self._int64_extended_atomics
126119

127-
128120
cpdef get_max_compute_units(self):
129121
""" Returns the number of parallel compute units
130122
available to the device. The minimum value is 1.
131123
"""
132124
return self._max_compute_units
133125

134-
135126
cpdef get_max_work_item_dims(self):
136127
""" Returns the maximum dimensions that specify
137128
the global and local work-item IDs used by the
@@ -141,7 +132,6 @@ cdef class _SyclDevice:
141132
"""
142133
return self._max_work_item_dims
143134

144-
145135
cpdef get_max_work_item_sizes(self):
146136
""" Returns the maximum number of work-items
147137
that are permitted in each dimension of the
@@ -154,7 +144,6 @@ cdef class _SyclDevice:
154144
max_work_item_sizes.append(self._max_work_item_sizes[n])
155145
return tuple(max_work_item_sizes)
156146

157-
158147
cpdef get_max_work_group_size(self):
159148
""" Returns the maximum number of work-items
160149
that are permitted in a work-group executing a
@@ -163,15 +152,13 @@ cdef class _SyclDevice:
163152
"""
164153
return self._max_work_group_size
165154

166-
167155
cpdef get_max_num_sub_groups(self):
168156
""" Returns the maximum number of sub-groups
169157
in a work-group for any kernel executed on the
170158
device. The minimum value is 1.
171159
"""
172160
return self._max_num_sub_groups
173161

174-
175162
cpdef is_accelerator(self):
176163
""" Returns True if the SyclDevice instance is a SYCL accelerator
177164
device.
@@ -182,7 +169,6 @@ cdef class _SyclDevice:
182169
"""
183170
return self._accelerator_device
184171

185-
186172
cpdef is_cpu(self):
187173
""" Returns True if the SyclDevice instance is a SYCL CPU device.
188174
@@ -191,7 +177,6 @@ cdef class _SyclDevice:
191177
"""
192178
return self._cpu_device
193179

194-
195180
cpdef is_gpu(self):
196181
""" Returns True if the SyclDevice instance is a SYCL GPU device.
197182
@@ -200,7 +185,6 @@ cdef class _SyclDevice:
200185
"""
201186
return self._gpu_device
202187

203-
204188
cpdef is_host(self):
205189
""" Returns True if the SyclDevice instance is a SYCL host device.
206190
@@ -209,14 +193,11 @@ cdef class _SyclDevice:
209193
"""
210194
return self._host_device
211195

212-
213-
214196
cdef DPCTLSyclDeviceRef get_device_ref (self):
215197
""" Returns the DPCTLSyclDeviceRef pointer for this class.
216198
"""
217199
return self._device_ref
218200

219-
220201
def addressof_ref(self):
221202
"""
222203
Returns the address of the DPCTLSyclDeviceRef pointer as a size_t.
@@ -227,9 +208,8 @@ cdef class _SyclDevice:
227208
"""
228209
return int(<size_t>self._device_ref)
229210

230-
231211
@property
232-
def __name__:
212+
def __name__():
233213
return "SyclDevice"
234214

235215

@@ -361,12 +341,10 @@ cdef class SyclDevice(_SyclDevice):
361341
"a SYCL filter selector string."
362342
)
363343

364-
365344
@property
366345
def __name__(self):
367346
return "SyclDevice"
368347

369-
370348
def __repr__(self):
371349
return "<dpctl." + self.__name__ + " at {}>".format(hex(id(self)))
372350

0 commit comments

Comments
 (0)