diff --git a/backends/arm/operators/op_exp.py b/backends/arm/operators/op_exp.py index 4b8232ef6e7..d9f0e4f5197 100644 --- a/backends/arm/operators/op_exp.py +++ b/backends/arm/operators/op_exp.py @@ -36,7 +36,14 @@ def define_node( output: TosaArg, ) -> None: - assert len(node.all_input_nodes) == 1 - assert inputs[0].dtype == output.dtype == ts.DType.FP32 + if len(node.all_input_nodes) != 1: + raise ValueError( + f"Expected 1 input for {self.target}, got {len(node.all_input_nodes)}" + ) + if inputs[0].dtype != ts.DType.FP32 or output.dtype != ts.DType.FP32: + raise ValueError( + f"Input and output for {self.target} need to be FP32, got input dtype: " + f"{inputs[0].dtype} and output dtype: {output.dtype}" + ) tosa_graph.addOperator(TosaOp.Op().EXP, [inputs[0].name], [output.name])