Skip to content
Snippets Groups Projects
Commit 203d8627 authored by kotsifa2's avatar kotsifa2
Browse files

Added some assertions in approx utils header file

parent 890965a4
No related branches found
No related tags found
No related merge requests found
...@@ -23,6 +23,7 @@ void* handleTensorAddApproximationTuples( ...@@ -23,6 +23,7 @@ void* handleTensorAddApproximationTuples(
case GPUNodeConfiguration::APPROX::FP16 : case GPUNodeConfiguration::APPROX::FP16 :
return tensorHalfAdd(input, bias); return tensorHalfAdd(input, bias);
default : default :
CUSTOM_ASSERT(false && "Unknown approximation type");
ERROR("Unknown approximation type"); ERROR("Unknown approximation type");
abort(); abort();
// TODO additional approx methods implemented here // TODO additional approx methods implemented here
...@@ -50,6 +51,7 @@ void* handleTensorMulApproximationTuples( ...@@ -50,6 +51,7 @@ void* handleTensorMulApproximationTuples(
case GPUNodeConfiguration::APPROX::FP16 : case GPUNodeConfiguration::APPROX::FP16 :
return tensorHalfGemmGPU(lhs, rhs); return tensorHalfGemmGPU(lhs, rhs);
default : default :
CUSTOM_ASSERT(false && "Unknown approximation type");
ERROR("Unknown approximation type"); ERROR("Unknown approximation type");
abort(); abort();
// TODO additional approx methods implemented here // TODO additional approx methods implemented here
...@@ -85,6 +87,7 @@ void* handleTensorConvApproximationTuples( ...@@ -85,6 +87,7 @@ void* handleTensorConvApproximationTuples(
conv_stride_h, conv_stride_w, conv_stride_h, conv_stride_w,
1, 1); 1, 1);
default : default :
CUSTOM_ASSERT(false && "Unknown approximation type");
ERROR("Unknown approximation type"); ERROR("Unknown approximation type");
abort(); abort();
// TODO additional approx methods implemented here // TODO additional approx methods implemented here
...@@ -121,6 +124,7 @@ void* handleTensorGroupConvApproximationTuples( ...@@ -121,6 +124,7 @@ void* handleTensorGroupConvApproximationTuples(
vertical_stride, horizontal_stride, vertical_stride, horizontal_stride,
conv_mode, conv_groups); conv_mode, conv_groups);
default : default :
CUSTOM_ASSERT(false && "Unknown approximation type");
ERROR("Unknown approximation type"); ERROR("Unknown approximation type");
abort(); abort();
// TODO additional approx methods implemented here // TODO additional approx methods implemented here
...@@ -151,6 +155,7 @@ void* handleTensorBatchNormApproximationTuples( ...@@ -151,6 +155,7 @@ void* handleTensorBatchNormApproximationTuples(
return tensorHalfBatchNorm(input_ptr, gamma_ptr, beta_ptr, return tensorHalfBatchNorm(input_ptr, gamma_ptr, beta_ptr,
mean_ptr, variance_ptr, epsilon); mean_ptr, variance_ptr, epsilon);
default : default :
CUSTOM_ASSERT(false && "Unknown approximation type");
ERROR("Unknown approximation type"); ERROR("Unknown approximation type");
abort(); abort();
// TODO additional approx methods implemented here // TODO additional approx methods implemented here
...@@ -178,6 +183,7 @@ void* handleTensorReluApproximationTuples( ...@@ -178,6 +183,7 @@ void* handleTensorReluApproximationTuples(
case GPUNodeConfiguration::APPROX::FP16 : case GPUNodeConfiguration::APPROX::FP16 :
return tensorHalfRelu(input); return tensorHalfRelu(input);
default : default :
CUSTOM_ASSERT(false && "Unknown approximation type");
ERROR("Unknown approximation type"); ERROR("Unknown approximation type");
abort(); abort();
// TODO additional approx methods implemented here // TODO additional approx methods implemented here
...@@ -205,6 +211,7 @@ void* handleTensorClippedReluApproximationTuples( ...@@ -205,6 +211,7 @@ void* handleTensorClippedReluApproximationTuples(
case GPUNodeConfiguration::APPROX::FP16 : case GPUNodeConfiguration::APPROX::FP16 :
return tensorHalfRelu2(input, min, max); return tensorHalfRelu2(input, min, max);
default : default :
CUSTOM_ASSERT(false && "Unknown approximation type");
ERROR("Unknown approximation type"); ERROR("Unknown approximation type");
abort(); abort();
// TODO additional approx methods implemented here // TODO additional approx methods implemented here
...@@ -232,6 +239,7 @@ void* handleTensorTanhApproximationTuples( ...@@ -232,6 +239,7 @@ void* handleTensorTanhApproximationTuples(
case GPUNodeConfiguration::APPROX::FP16 : case GPUNodeConfiguration::APPROX::FP16 :
return tensorHalfTanh(input); return tensorHalfTanh(input);
default : default :
CUSTOM_ASSERT(false && "Unknown approximation type");
ERROR("Unknown approximation type"); ERROR("Unknown approximation type");
abort(); abort();
// TODO additional approx methods implemented here // TODO additional approx methods implemented here
...@@ -270,6 +278,7 @@ void* handleTensorPoolingApproximationTuples( ...@@ -270,6 +278,7 @@ void* handleTensorPoolingApproximationTuples(
vertical_pad, horizontal_pad, vertical_pad, horizontal_pad,
vertical_stride, horizontal_stride); vertical_stride, horizontal_stride);
default : default :
CUSTOM_ASSERT(false && "Unknown approximation type");
ERROR("Unknown approximation type"); ERROR("Unknown approximation type");
abort(); abort();
// TODO additional approx methods implemented here // TODO additional approx methods implemented here
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment