diff --git a/concrete/numpy/compile.py b/concrete/numpy/compile.py index a00cbc030..0d7bb559d 100644 --- a/concrete/numpy/compile.py +++ b/concrete/numpy/compile.py @@ -157,7 +157,7 @@ def _compile_numpy_function_into_op_graph_internal( # Make sure the graph can be lowered to MLIR if not is_graph_values_compatible_with_mlir(op_graph): - raise TypeError("signed integers aren't supported for MLIR lowering") + raise RuntimeError("function you are trying to compile isn't supported for MLIR lowering") # Update bit_width for MLIR update_bit_width_for_mlir(op_graph) diff --git a/tests/numpy/test_compile.py b/tests/numpy/test_compile.py index 1ef3cd0c3..5f30b9838 100644 --- a/tests/numpy/test_compile.py +++ b/tests/numpy/test_compile.py @@ -251,7 +251,7 @@ def test_fail_compile(function, input_ranges, list_of_arg_names): arg_name: EncryptedScalar(Integer(64, True)) for arg_name in list_of_arg_names } - with pytest.raises(TypeError, match=r"signed integers aren't supported for MLIR lowering"): + with pytest.raises(RuntimeError, match=".*isn't supported for MLIR lowering.*"): compile_numpy_function_into_op_graph( function, function_parameters,