Imported Upstream version 1.8.0
[platform/core/ml/nnfw.git] / compiler / luci-interpreter / src / kernels / Add.cpp
index 9b93347..9ed155e 100644 (file)
@@ -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()));
 }