summaryrefslogtreecommitdiff
path: root/compiler/luci-interpreter/src/kernels/Add.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/luci-interpreter/src/kernels/Add.cpp')
-rw-r--r--compiler/luci-interpreter/src/kernels/Add.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/luci-interpreter/src/kernels/Add.cpp b/compiler/luci-interpreter/src/kernels/Add.cpp
index 9b9334792..9ed155e94 100644
--- a/compiler/luci-interpreter/src/kernels/Add.cpp
+++ b/compiler/luci-interpreter/src/kernels/Add.cpp
@@ -36,7 +36,10 @@ Add::Add(const Tensor *input1, const Tensor *input2, Tensor *output, const AddPa
void Add::configure()
{
- assert(input1()->element_type() == input2()->element_type());
+ if (input1()->element_type() != input2()->element_type())
+ {
+ throw std::runtime_error("Input Tensor Data Type Mismatch.");
+ }
output()->resize(calculateShapeForBroadcast(input1()->shape(), input2()->shape()));
}