@@ -78,8 +78,8 @@ def __call__(self, x, out=None, order="K"):
78
78
)
79
79
80
80
if out .shape != x .shape :
81
- raise TypeError (
82
- "The shape of input and output arrays are inconsistent."
81
+ raise ValueError (
82
+ "The shape of input and output arrays are inconsistent. "
83
83
f"Expected output shape is { x .shape } , got { out .shape } "
84
84
)
85
85
@@ -103,7 +103,7 @@ def __call__(self, x, out=None, order="K"):
103
103
dpctl .utils .get_execution_queue ((x .sycl_queue , out .sycl_queue ))
104
104
is None
105
105
):
106
- raise TypeError (
106
+ raise ExecutionPlacementError (
107
107
"Input and output allocation queues are not compatible"
108
108
)
109
109
@@ -471,8 +471,8 @@ def __call__(self, o1, o2, out=None, order="K"):
471
471
)
472
472
473
473
if out .shape != res_shape :
474
- raise TypeError (
475
- "The shape of input and output arrays are inconsistent."
474
+ raise ValueError (
475
+ "The shape of input and output arrays are inconsistent. "
476
476
f"Expected output shape is { o1_shape } , got { out .shape } "
477
477
)
478
478
@@ -486,7 +486,7 @@ def __call__(self, o1, o2, out=None, order="K"):
486
486
dpctl .utils .get_execution_queue ((exec_q , out .sycl_queue ))
487
487
is None
488
488
):
489
- raise TypeError (
489
+ raise ExecutionPlacementError (
490
490
"Input and output allocation queues are not compatible"
491
491
)
492
492
0 commit comments