diff --git a/dpctl/_sycl_device.pyx b/dpctl/_sycl_device.pyx index b1a6245465..0f608f7f38 100644 --- a/dpctl/_sycl_device.pyx +++ b/dpctl/_sycl_device.pyx @@ -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")