Skip to content

Commit 323d301

Browse files
author
Diptorup Deb
authored
Refactor/device properties (#324)
* Convert all device attributes to properties.
1 parent 521046c commit 323d301

10 files changed

+186
-208
lines changed

dpctl/_sycl_device.pxd

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
""" This file declares the SyclDevice extension type.
2121
"""
2222

23-
from libcpp cimport bool
24-
from libc.stdint cimport uint32_t
2523
from ._backend cimport (
2624
DPCTLSyclDeviceRef,
2725
DPCTLSyclDeviceSelectorRef,
@@ -32,18 +30,10 @@ cdef class _SyclDevice:
3230
''' Wrapper class for a Sycl Device
3331
'''
3432
cdef DPCTLSyclDeviceRef _device_ref
35-
cdef bool _accelerator_device
36-
cdef bool _cpu_device
37-
cdef bool _gpu_device
38-
cdef bool _host_device
3933
cdef const char *_vendor_name
4034
cdef const char *_device_name
4135
cdef const char *_driver_version
42-
cdef uint32_t _max_compute_units
43-
cdef uint32_t _max_work_item_dims
4436
cdef size_t *_max_work_item_sizes
45-
cdef size_t _max_work_group_size
46-
cdef uint32_t _max_num_sub_groups
4737

4838

4939
cdef class SyclDevice(_SyclDevice):
@@ -54,17 +44,3 @@ cdef class SyclDevice(_SyclDevice):
5444
cdef int _init_from__SyclDevice(self, _SyclDevice other)
5545
cdef int _init_from_selector(self, DPCTLSyclDeviceSelectorRef DSRef)
5646
cdef DPCTLSyclDeviceRef get_device_ref(self)
57-
cpdef get_backend(self)
58-
cpdef get_device_name(self)
59-
cpdef get_device_type(self)
60-
cpdef get_vendor_name(self)
61-
cpdef get_driver_version(self)
62-
cpdef get_max_compute_units(self)
63-
cpdef get_max_work_item_dims(self)
64-
cpdef get_max_work_item_sizes(self)
65-
cpdef get_max_work_group_size(self)
66-
cpdef get_max_num_sub_groups(self)
67-
cpdef is_accelerator(self)
68-
cpdef is_cpu(self)
69-
cpdef is_gpu(self)
70-
cpdef is_host(self)

0 commit comments

Comments
 (0)