mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 19:44:57 -05:00
fix: generalize error message for unsupported functions
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user