[nnc] Remove batchnorm code snippet (#6626)
authorСергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 <s.barannikov@samsung.com>
Thu, 15 Aug 2019 17:27:08 +0000 (02:27 +0900)
committerAlexander Efimov/AI Tools Lab/./Samsung Electronics <a.efimov@samsung.com>
Thu, 15 Aug 2019 17:27:08 +0000 (20:27 +0300)
It was left behind when the rest of the support of `BatchNormOp` was removed.

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
compiler/nnc/passes/soft_backend/CPPGenerator.cpp
compiler/nnc/passes/soft_backend/code_snippets/cpp_batchnorm.def [deleted file]

index c48ab6a..39c1707 100644 (file)
@@ -45,7 +45,6 @@ using namespace std;
 #include "cpp_resize.generated.h"
 #include "cpp_softmax.generated.h"
 #include "cpp_slice.generated.h"
-#include "cpp_batchnorm.generated.h"
 #include "cpp_elu.generated.h"
 #include "cpp_tanh.generated.h"
 #include "cpp_elementwise.generated.h"
@@ -344,7 +343,6 @@ void CPPCodeGenerator::materializeCode(ostream &out, const ModelAnalyzer &ma, co
   // Operations calls into all of the above
   out.write(cpp_operations, sizeof(cpp_operations));
   // Below call into operations
-  out.write(cpp_batchnorm, sizeof(cpp_batchnorm));
   out.write(cpp_leaky_relu, sizeof(cpp_leaky_relu));
 
   // gen NN constructor
diff --git a/compiler/nnc/passes/soft_backend/code_snippets/cpp_batchnorm.def b/compiler/nnc/passes/soft_backend/code_snippets/cpp_batchnorm.def
deleted file mode 100644 (file)
index 3e40b91..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-void batchNorm(Tensor &out, const char *params, const Tensor &in)
-{
-  out.reshape(in.getShape());
-  float eps = deserializeT<float>(params);
-  (float)eps;
-  float avgFraction = deserializeT<float>(params);
-  (float)avgFraction;
-  bool spatial = deserializeT<int32_t>(params);
-  (void)spatial;
-  out.fillData(in.getData(), in.getShape().getNumElems());
-}