Skip to content

Commit b0b64d7

Browse files
author
Diptorup Deb
committed
Rename host_device to host.
1 parent ad6eabf commit b0b64d7

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

dpctl/_sycl_device.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ cdef class SyclDevice(_SyclDevice):
351351
elif DTy == _device_type._GPU:
352352
return device_type.gpu
353353
elif DTy == _device_type._HOST_DEVICE:
354-
return device_type.host_device
354+
return device_type.host
355355
else:
356356
raise ValueError("Unknown device type.")
357357

dpctl/_sycl_device_factory.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ cdef _device_type _string_to_dpctl_sycl_device_ty(str dty_str):
9494
return _device_type._CUSTOM
9595
elif dty_str == "gpu":
9696
return _device_type._GPU
97-
elif dty_str == "host_device":
97+
elif dty_str == "host":
9898
return _device_type._HOST_DEVICE
9999
else:
100100
return _device_type._UNKNOWN_DEVICE
@@ -164,7 +164,7 @@ cpdef list get_devices(backend=backend_type.all, device_type=device_type_t.all):
164164
device_type (optional): Defaults to ``dpctl.device_type.all``.
165165
A :class:`dpctl.device_type` enum value or a string that
166166
specifies a SYCL device type. Currently, accepted values are:
167-
"gpu", "cpu", "accelerator", "host_device", or "all".
167+
"gpu", "cpu", "accelerator", "host", or "all".
168168
Returns:
169169
list: A list of available :class:`dpctl.SyclDevice` instances that
170170
satisfy the provided :class:`dpctl.backend_type` and
@@ -217,7 +217,7 @@ cpdef int get_num_devices(
217217
device_type (optional): Defaults to ``dpctl.device_type.all``.
218218
A :class:`dpctl.device_type` enum value or a string that
219219
specifies a SYCL device type. Currently, accepted values are:
220-
"gpu", "cpu", "accelerator", "host_device", or "all".
220+
"gpu", "cpu", "accelerator", "host", or "all".
221221
Returns:
222222
int: The number of available SYCL devices that satisfy the provided
223223
:class:`dpctl.backend_type` and :class:`dpctl.device_type` values.

dpctl/enum_types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class device_type(Enum):
3939
gpu 1
4040
cpu 2
4141
accelerator 3
42-
host_device 4
42+
host 4
4343
================== ============
4444
"""
4545

@@ -49,7 +49,7 @@ class device_type(Enum):
4949
cpu = auto()
5050
custom = auto()
5151
gpu = auto()
52-
host_device = auto()
52+
host = auto()
5353

5454

5555
class backend_type(Enum):

dpctl/tests/test_sycl_device_factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
(bty.level_zero, dty.gpu),
2828
(bty.opencl, dty.gpu),
2929
(bty.opencl, dty.cpu),
30-
(bty.host, dty.host_device),
30+
(bty.host, dty.host),
3131
]
3232

3333
argument_list_2 = [

0 commit comments

Comments
 (0)