[moco-tf] Removing CompilerArgs.h (#6133)
author윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 <hyunsik.yoon@samsung.com>
Fri, 2 Aug 2019 04:01:07 +0000 (13:01 +0900)
committer박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Fri, 2 Aug 2019 04:01:07 +0000 (13:01 +0900)
With this commit, CompilerArgs.h was removed and header inclusion errors were fixed.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
compiler/moco-tf/src/CompilerArgs.h [deleted file]
compiler/moco-tf/src/CompilerArgs.test.cpp [deleted file]
compiler/moco-tf/src/Op/Add.test.cpp
compiler/moco-tf/src/Op/Mul.test.cpp
compiler/moco-tf/src/Op/Placeholder.test.cpp

diff --git a/compiler/moco-tf/src/CompilerArgs.h b/compiler/moco-tf/src/CompilerArgs.h
deleted file mode 100644 (file)
index 7529935..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2019 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.
- */
-
-#ifndef __COMPILER_ARGS_H
-#define __COMPILER_ARGS_H
-
-#include <nncc/core/ADT/tensor/Shape.h>
-
-#include <map>
-#include <stdexcept>
-
-namespace moco
-{
-namespace tf
-{
-
-/**
- * @brief Class that stores parsed arguments passed from command line interface.
- *        Command line parser should fill member vars of the instance of this class.
- */
-class CompilerArgs final
-{
-public:
-  /**
-   * @brief Adds graph input name and its shape provided from user
-   */
-  void addInput(const std::string &input_name, const nncc::core::ADT::tensor::Shape &shape)
-  {
-    if (_inputs.find(input_name) != _inputs.end())
-      throw std::runtime_error{"Duplicated input name: " + input_name};
-
-    _inputs[input_name] = shape;
-  }
-
-  const nncc::core::ADT::tensor::Shape *getInputShape(const std::string &input_name)
-  {
-    auto res = _inputs.find(input_name);
-    if (res == _inputs.end())
-      return nullptr;
-    else
-      return &res->second;
-  }
-
-public:
-  /**
-   * @brief function to get a singleton instance
-   */
-  static CompilerArgs *get()
-  {
-    static CompilerArgs me;
-    return &me;
-  }
-
-  /**
-   * @brief Clears all data. Only for testing purpose.
-   */
-  void clear() { _inputs.clear(); }
-
-private:
-  CompilerArgs() = default;
-
-private:
-  // For command line argument input shapes and input names
-  std::map<std::string, nncc::core::ADT::tensor::Shape> _inputs;
-
-  // add more compiler arguments
-};
-
-} // namespace tf
-} // namespace moco
-
-#endif // __COMPILER_ARGS_H
diff --git a/compiler/moco-tf/src/CompilerArgs.test.cpp b/compiler/moco-tf/src/CompilerArgs.test.cpp
deleted file mode 100644 (file)
index 1cf2150..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 2019 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.
- */
-
-#include "CompilerArgs.h"
-
-#include <gtest/gtest.h>
-
-#include <string>
-
-TEST(CompilerArgs, inputShape_empty)
-{
-  auto args = moco::tf::CompilerArgs::get();
-
-  std::string any_name = "any";
-  ASSERT_TRUE(args->getInputShape(any_name) == nullptr);
-}
index 134d5f6..dc53f37 100644 (file)
@@ -15,7 +15,6 @@
  */
 
 #include "TestHelper.h"
-#include "CompilerArgs.h"
 
 #include "Importer.h"
 
index 7da1a67..7bc1386 100644 (file)
@@ -15,7 +15,6 @@
  */
 
 #include "TestHelper.h"
-#include "CompilerArgs.h"
 
 #include "Importer.h"
 
index 963076c..0fe32af 100644 (file)
@@ -15,7 +15,6 @@
  */
 
 #include "TestHelper.h"
-#include "CompilerArgs.h"
 
 #include "Importer.h"