@@ -74,19 +74,16 @@ cdef class _SyclDevice:
74
74
DPCTLCString_Delete(self ._driver_version)
75
75
DPCTLSize_t_Array_Delete(self ._max_work_item_sizes)
76
76
77
-
78
77
def dump_device_info (self ):
79
78
""" Print information about the SYCL device.
80
79
"""
81
80
DPCTLDevice_DumpInfo(self ._device_ref)
82
81
83
-
84
82
cpdef get_device_name(self ):
85
83
""" Returns the name of the device as a string
86
84
"""
87
85
return self ._device_name.decode()
88
86
89
-
90
87
cpdef get_device_type(self ):
91
88
""" Returns the type of the device as a `device_type` enum
92
89
"""
@@ -97,13 +94,11 @@ cdef class _SyclDevice:
97
94
else :
98
95
raise ValueError (" Unknown device type." )
99
96
100
-
101
97
cpdef get_vendor_name(self ):
102
98
""" Returns the device vendor name as a string
103
99
"""
104
100
return self ._vendor_name.decode()
105
101
106
-
107
102
cpdef get_driver_version(self ):
108
103
""" Returns the OpenCL software driver version as a string
109
104
in the form: major number.minor number, if this SYCL
@@ -112,26 +107,22 @@ cdef class _SyclDevice:
112
107
"""
113
108
return self ._driver_version.decode()
114
109
115
-
116
110
cpdef has_int64_base_atomics(self ):
117
111
""" Returns true if device has int64_base_atomics else returns false.
118
112
"""
119
113
return self ._int64_base_atomics
120
114
121
-
122
115
cpdef has_int64_extended_atomics(self ):
123
116
""" Returns true if device has int64_extended_atomics else returns false.
124
117
"""
125
118
return self ._int64_extended_atomics
126
119
127
-
128
120
cpdef get_max_compute_units(self ):
129
121
""" Returns the number of parallel compute units
130
122
available to the device. The minimum value is 1.
131
123
"""
132
124
return self ._max_compute_units
133
125
134
-
135
126
cpdef get_max_work_item_dims(self ):
136
127
""" Returns the maximum dimensions that specify
137
128
the global and local work-item IDs used by the
@@ -141,7 +132,6 @@ cdef class _SyclDevice:
141
132
"""
142
133
return self ._max_work_item_dims
143
134
144
-
145
135
cpdef get_max_work_item_sizes(self ):
146
136
""" Returns the maximum number of work-items
147
137
that are permitted in each dimension of the
@@ -154,7 +144,6 @@ cdef class _SyclDevice:
154
144
max_work_item_sizes.append(self ._max_work_item_sizes[n])
155
145
return tuple (max_work_item_sizes)
156
146
157
-
158
147
cpdef get_max_work_group_size(self ):
159
148
""" Returns the maximum number of work-items
160
149
that are permitted in a work-group executing a
@@ -163,15 +152,13 @@ cdef class _SyclDevice:
163
152
"""
164
153
return self ._max_work_group_size
165
154
166
-
167
155
cpdef get_max_num_sub_groups(self ):
168
156
""" Returns the maximum number of sub-groups
169
157
in a work-group for any kernel executed on the
170
158
device. The minimum value is 1.
171
159
"""
172
160
return self ._max_num_sub_groups
173
161
174
-
175
162
cpdef is_accelerator(self ):
176
163
""" Returns True if the SyclDevice instance is a SYCL accelerator
177
164
device.
@@ -182,7 +169,6 @@ cdef class _SyclDevice:
182
169
"""
183
170
return self ._accelerator_device
184
171
185
-
186
172
cpdef is_cpu(self ):
187
173
""" Returns True if the SyclDevice instance is a SYCL CPU device.
188
174
@@ -191,7 +177,6 @@ cdef class _SyclDevice:
191
177
"""
192
178
return self ._cpu_device
193
179
194
-
195
180
cpdef is_gpu(self ):
196
181
""" Returns True if the SyclDevice instance is a SYCL GPU device.
197
182
@@ -200,7 +185,6 @@ cdef class _SyclDevice:
200
185
"""
201
186
return self ._gpu_device
202
187
203
-
204
188
cpdef is_host(self ):
205
189
""" Returns True if the SyclDevice instance is a SYCL host device.
206
190
@@ -209,14 +193,11 @@ cdef class _SyclDevice:
209
193
"""
210
194
return self ._host_device
211
195
212
-
213
-
214
196
cdef DPCTLSyclDeviceRef get_device_ref (self ):
215
197
""" Returns the DPCTLSyclDeviceRef pointer for this class.
216
198
"""
217
199
return self ._device_ref
218
200
219
-
220
201
def addressof_ref (self ):
221
202
"""
222
203
Returns the address of the DPCTLSyclDeviceRef pointer as a size_t.
@@ -227,9 +208,8 @@ cdef class _SyclDevice:
227
208
"""
228
209
return int (< size_t> self ._device_ref)
229
210
230
-
231
211
@property
232
- def __name__ :
212
+ def __name__ () :
233
213
return " SyclDevice"
234
214
235
215
@@ -361,12 +341,10 @@ cdef class SyclDevice(_SyclDevice):
361
341
" a SYCL filter selector string."
362
342
)
363
343
364
-
365
344
@property
366
345
def __name__ (self ):
367
346
return " SyclDevice"
368
347
369
-
370
348
def __repr__ (self ):
371
349
return " <dpctl." + self .__name__ + " at {}>" .format(hex (id (self )))
372
350
0 commit comments