chore: ease signed integer restriction on high bit-widths

This commit is contained in:
Umut
2022-09-08 10:56:46 +03:00
parent 0cfceaaf03
commit b8a91cac62
2 changed files with 0 additions and 23 deletions

View File

@@ -246,12 +246,6 @@ class GraphConverter:
f"up to {MAXIMUM_TLU_BIT_WIDTH}-bit integers"
]
if first_signed_node is not None and max_bit_width > MAXIMUM_TLU_BIT_WIDTH:
offending_nodes[first_signed_node] = [
f"signed values are only supported on circuits with "
f"up to {MAXIMUM_TLU_BIT_WIDTH}-bit integers"
]
if len(offending_nodes) != 0:
raise RuntimeError(
"Function you are trying to compile cannot be converted to MLIR:\n\n"

View File

@@ -426,23 +426,6 @@ Subgraphs:
%5 = astype(%4, dtype=int_) # EncryptedScalar<uint1>
return %5
""", # noqa: E501
),
pytest.param(
lambda x: x - 300,
{"x": "encrypted"},
range(200),
RuntimeError,
"""
Function you are trying to compile cannot be converted to MLIR:
%0 = x # EncryptedScalar<uint8>
%1 = 300 # ClearScalar<uint9>
%2 = subtract(%0, %1) # EncryptedScalar<int10>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ signed values are only supported on circuits with up to 8-bit integers
return %2
""", # noqa: E501
),
],