From d82f71e79a1a570008022d168519c3d54f299860 Mon Sep 17 00:00:00 2001 From: Benoit Chevallier-Mames Date: Fri, 15 Oct 2021 14:02:55 +0200 Subject: [PATCH] chore: more verbosing in case of errors. --- concrete/common/mlir/converters.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/concrete/common/mlir/converters.py b/concrete/common/mlir/converters.py index 21d09c791..74f08cebb 100644 --- a/concrete/common/mlir/converters.py +++ b/concrete/common/mlir/converters.py @@ -169,9 +169,15 @@ def apply_lut(node, preds, ir_to_mlir_node, ctx): assert_true(len(node.inputs) == 1, "LUT should have a single input") assert_true(len(node.outputs) == 1, "LUT should have a single output") if not value_is_encrypted_scalar_unsigned_integer(node.inputs[0]): - raise TypeError("Only support LUT with encrypted unsigned integers inputs") + raise TypeError( + f"Only support LUT with encrypted unsigned integers inputs " + f"(but {node.inputs[0]} is provided)" + ) if not value_is_encrypted_scalar_unsigned_integer(node.outputs[0]): - raise TypeError("Only support LUT with encrypted unsigned integers outputs") + raise TypeError( + f"Only support LUT with encrypted unsigned integers outputs " + f"(but {node.outputs[0]} is provided)" + ) x_node = preds[0] x = ir_to_mlir_node[x_node]