diff --git a/llvm/projects/hpvm-tensor-rt/tensor_runtime/include/device_math.h b/llvm/projects/hpvm-tensor-rt/tensor_runtime/include/device_math.h
index 235ac088da8bc9b19785f2e0f00bbb81afba42a6..0f3cd1970e2aec5dcc4cbebeec4785a31fa1086a 100644
--- a/llvm/projects/hpvm-tensor-rt/tensor_runtime/include/device_math.h
+++ b/llvm/projects/hpvm-tensor-rt/tensor_runtime/include/device_math.h
@@ -6,6 +6,8 @@
 #include <stdexcept>
 #include <limits>
 
+#include "debug.h"
+
 enum class MathOp {
   Hypot,
   Atan2,
@@ -39,7 +41,7 @@ template <typename T> T reduceOpToIdentity(MathOp op) {
   case MathOp::Min:
     return std::numeric_limits<T>::max();
   default:
-    throw std::runtime_error("Operator does not have id value");
+    ERROR("Operator does not have id value\n");
   }
 }