Skip to content

Commit d166366

Browse files
committed
Docstring tweaks
Added optional back to `dpctl.SyclPlatform.get_devices` device_type argument Made typing of arguments explicit in `dpctl.get_num_devices` and `dpctl.get_devices`
1 parent c99d791 commit d166366

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

dpctl/_sycl_device_factory.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,12 @@ cpdef list get_devices(backend=backend_type.all, device_type=device_type_t.all):
154154
``backend`` in addition to only ``device_type``.
155155
156156
Args:
157-
backend (optional):
157+
backend (str, :class:`dpctl.backend_type`, optional):
158158
A :class:`dpctl.backend_type` enum value or a string that
159159
specifies a SYCL backend. Currently, accepted values are: "cuda",
160160
"hip", "opencl", "level_zero", or "all".
161161
Default: ``dpctl.backend_type.all``.
162-
device_type (optional):
162+
device_type (str, :class:`dpctl.device_type`, optional):
163163
A :class:`dpctl.device_type` enum value or a string that
164164
specifies a SYCL device type. Currently, accepted values are:
165165
"gpu", "cpu", "accelerator", or "all".
@@ -210,12 +210,12 @@ cpdef int get_num_devices(
210210
:class:`dpctl.device_type` and :class:`dpctl.backend_type`.
211211
212212
Args:
213-
backend (optional):
213+
backend (str, :class:`dpctl.backend_type`, optional):
214214
A :class:`dpctl.backend_type` enum value or a string that
215215
specifies a SYCL backend. Currently, accepted values are: "cuda",
216216
"hip", "opencl", "level_zero", or "all".
217217
Default: ``dpctl.backend_type.all``.
218-
device_type (optional):
218+
device_type (str, :class:`dpctl.device_type`, optional):
219219
A :class:`dpctl.device_type` enum value or a string that
220220
specifies a SYCL device type. Currently, accepted values are:
221221
"gpu", "cpu", "accelerator", or "all".

dpctl/_sycl_platform.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ cdef class SyclPlatform(_SyclPlatform):
382382
the given :class:`dpctl.device_type`.
383383
384384
Args:
385-
device_type (str, :class:`dpctl.device_type`):
385+
device_type (str, :class:`dpctl.device_type`, optional):
386386
A :class:`dpctl.device_type` enum value or a string that
387387
specifies a SYCL device type. Currently, accepted values are:
388388
"gpu", "cpu", "accelerator", or "all", and their equivalent

0 commit comments

Comments
 (0)