Skip to content

Commit

Permalink
Tweak create_sub_devices docstring and raise TypeError if partition i…
Browse files Browse the repository at this point in the history
…s not specified
  • Loading branch information
ndgrigorian committed Jan 13, 2025
1 parent ec6c1d9 commit 9559620
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions dpctl/_sycl_device.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1660,14 +1660,13 @@ cdef class SyclDevice(_SyclDevice):
Raises:
ValueError:
If the ``partition`` keyword argument is not specified or
the affinity domain string is not legal or is not one of the
three supported options.
If the ``partition`` keyword argument is not one of the three
supported options or is not a legal affinity domain string.
dpctl.SyclSubdeviceCreationError:
If sub-devices can not be created.
"""
if "partition" not in kwargs:
raise ValueError(
raise TypeError(
"create_sub_devices(partition=parition_spec) is expected."
)
partition = kwargs.pop("partition")
Expand Down

0 comments on commit 9559620

Please sign in to comment.