diff --git a/concrete/common/mlir/utils.py b/concrete/common/mlir/utils.py index ee3c0dd1a..4ddb6db09 100644 --- a/concrete/common/mlir/utils.py +++ b/concrete/common/mlir/utils.py @@ -90,6 +90,9 @@ def check_node_compatibility_with_mlir( if node.op_name == "TLU": # pragma: no cover return "only unsigned integer lookup tables are supported" + if node.op_name.startswith("astype"): + return f"{node.op_name} is not supported without fusing" + # e.g., `np.absolute is not supported for the time being` return f"{node.op_name} is not supported for the time being" else: diff --git a/tests/numpy/test_compile.py b/tests/numpy/test_compile.py index 161e0d852..b2f92c30d 100644 --- a/tests/numpy/test_compile.py +++ b/tests/numpy/test_compile.py @@ -1074,7 +1074,7 @@ function you are trying to compile isn't supported for MLIR lowering %8 = Mul(%7, %0) # EncryptedScalar> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ only integer multiplication is supported %9 = astype(int32)(%8) # EncryptedScalar> -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ astype(int32) is not supported for the time being +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ astype(int32) is not supported without fusing return(%9) """.lstrip() # noqa: E501 ),