diff options
author | Chunseok Lee <chunseok.lee@samsung.com> | 2021-04-20 18:01:41 +0900 |
---|---|---|
committer | Chunseok Lee <chunseok.lee@samsung.com> | 2021-04-20 18:01:41 +0900 |
commit | 589bb1db6db6784efe21b3fbbfbfdb79aaa5f14e (patch) | |
tree | 47a2b23ce4220e3a4150c8b12ed941555272fb0c /compiler/enco | |
parent | 62529acabbafce7730601ed01d5709d7bc0d378a (diff) | |
download | nnfw-589bb1db6db6784efe21b3fbbfbfdb79aaa5f14e.tar.gz nnfw-589bb1db6db6784efe21b3fbbfbfdb79aaa5f14e.tar.bz2 nnfw-589bb1db6db6784efe21b3fbbfbfdb79aaa5f14e.zip |
Imported Upstream version 1.15.0upstream/1.15.0submit/tizen/20210427.093759submit/tizen/20210423.055448submit/tizen/20210422.015846submit/tizen/20210421.062230accepted/tizen/unified/20210428.040443
Diffstat (limited to 'compiler/enco')
41 files changed, 65 insertions, 82 deletions
diff --git a/compiler/enco/cli/CMakeLists.txt b/compiler/enco/cli/CMakeLists.txt index 5a43ab655..6777f329b 100644 --- a/compiler/enco/cli/CMakeLists.txt +++ b/compiler/enco/cli/CMakeLists.txt @@ -5,7 +5,6 @@ target_include_directories(enco-cli PRIVATE src) target_link_libraries(enco-cli enco_intf_cmdline) target_link_libraries(enco-cli enco_intf_frontend) target_link_libraries(enco-cli enco_core) -target_link_libraries(enco-cli stdex) target_link_libraries(enco-cli dl) # Let's use project-wide compile options target_link_libraries(enco-cli nncc_common) diff --git a/compiler/enco/cli/src/Driver.cpp b/compiler/enco/cli/src/Driver.cpp index 185bb13b9..fe6cefb8c 100644 --- a/compiler/enco/cli/src/Driver.cpp +++ b/compiler/enco/cli/src/Driver.cpp @@ -135,8 +135,7 @@ private: } // namespace -#include <stdex/Memory.h> - +#include <memory> #include <map> #include <iostream> @@ -153,7 +152,7 @@ static int entry(int argc, char **argv) std::map<std::string, std::function<void(const std::string &arg)>> argparse; argparse["--frontend"] = [&](const std::string &path) { - frontend_zone = stdex::make_unique<FrontendZone>(path); + frontend_zone = std::make_unique<FrontendZone>(path); }; argparse["--frontend-arg"] = [&](const std::string &arg) { frontend_zone->append(arg); }; diff --git a/compiler/enco/core/CMakeLists.txt b/compiler/enco/core/CMakeLists.txt index f437e687a..25dad2bc6 100644 --- a/compiler/enco/core/CMakeLists.txt +++ b/compiler/enco/core/CMakeLists.txt @@ -17,7 +17,6 @@ target_link_libraries(enco_core PUBLIC coco_generic) # These libraries are linked for internal use, and thus does not appear in public headers. target_link_libraries(enco_core PRIVATE pp) target_link_libraries(enco_core PRIVATE morph) -target_link_libraries(enco_core PRIVATE stdex) # Let's use nncc project-wide build options target_link_libraries(enco_core PRIVATE nncc_common) diff --git a/compiler/enco/core/src/ANN/Binder.h b/compiler/enco/core/src/ANN/Binder.h index 71b95676b..be9f705c7 100644 --- a/compiler/enco/core/src/ANN/Binder.h +++ b/compiler/enco/core/src/ANN/Binder.h @@ -32,7 +32,7 @@ class ANNBinder { public: ANNBinder(coco::Block *block, std::unique_ptr<ann::Module> &&module) - : _block{block}, _module{std::move(module)} + : _block{block}, _module{std::move(module)} { // DO NOTHING } diff --git a/compiler/enco/core/src/ANN/Context.cpp b/compiler/enco/core/src/ANN/Context.cpp index d4d1882fa..b6d2a3d42 100644 --- a/compiler/enco/core/src/ANN/Context.cpp +++ b/compiler/enco/core/src/ANN/Context.cpp @@ -16,12 +16,12 @@ #include "ANN/Context.h" -#include <stdex/Memory.h> +#include <memory> ANNBinder *ANNContext::create(coco::Block *blk) { - auto mod = stdex::make_unique<ann::Module>(); - auto obj = stdex::make_unique<ANNBinder>(blk, std::move(mod)); + auto mod = std::make_unique<ann::Module>(); + auto obj = std::make_unique<ANNBinder>(blk, std::move(mod)); auto ptr = obj.get(); _binders.emplace_back(std::move(obj)); diff --git a/compiler/enco/core/src/ANN/Context.test.cpp b/compiler/enco/core/src/ANN/Context.test.cpp index 7fd26f30c..252d92290 100644 --- a/compiler/enco/core/src/ANN/Context.test.cpp +++ b/compiler/enco/core/src/ANN/Context.test.cpp @@ -33,7 +33,7 @@ public: protected: std::unique_ptr<coco::Module> m; }; -} +} // namespace TEST_F(ANNContextTest, constructor) { diff --git a/compiler/enco/core/src/ANN/IR/OperandInventory.cpp b/compiler/enco/core/src/ANN/IR/OperandInventory.cpp index c7ad38811..4399c3900 100644 --- a/compiler/enco/core/src/ANN/IR/OperandInventory.cpp +++ b/compiler/enco/core/src/ANN/IR/OperandInventory.cpp @@ -16,9 +16,9 @@ #include "ANN/IR/OperandInventory.h" -#include <stdex/Memory.h> +#include <memory> -using stdex::make_unique; +using std::make_unique; namespace ann { diff --git a/compiler/enco/core/src/ANN/IR/Operation.h b/compiler/enco/core/src/ANN/IR/Operation.h index cacc2b794..a1f1d46e2 100644 --- a/compiler/enco/core/src/ANN/IR/Operation.h +++ b/compiler/enco/core/src/ANN/IR/Operation.h @@ -38,7 +38,7 @@ public: public: Operation(const Code &code, std::initializer_list<OperandID> inputs, std::initializer_list<OperandID> outputs) - : _code{code}, _inputs{inputs}, _outputs{outputs} + : _code{code}, _inputs{inputs}, _outputs{outputs} { // DO NOTHING } diff --git a/compiler/enco/core/src/ANN/IR/OperationInventory.cpp b/compiler/enco/core/src/ANN/IR/OperationInventory.cpp index 37d48c170..93108dfb7 100644 --- a/compiler/enco/core/src/ANN/IR/OperationInventory.cpp +++ b/compiler/enco/core/src/ANN/IR/OperationInventory.cpp @@ -16,9 +16,9 @@ #include "OperationInventory.h" -#include <stdex/Memory.h> +#include <memory> -using stdex::make_unique; +using std::make_unique; namespace ann { diff --git a/compiler/enco/core/src/ANN/IR/WeightInventory.cpp b/compiler/enco/core/src/ANN/IR/WeightInventory.cpp index d8809ac08..edcb16aed 100644 --- a/compiler/enco/core/src/ANN/IR/WeightInventory.cpp +++ b/compiler/enco/core/src/ANN/IR/WeightInventory.cpp @@ -16,9 +16,9 @@ #include "WeightInventory.h" -#include <stdex/Memory.h> +#include <memory> -using stdex::make_unique; +using std::make_unique; namespace ann { diff --git a/compiler/enco/core/src/AsmCode.h b/compiler/enco/core/src/AsmCode.h index c43892888..6d57f1851 100644 --- a/compiler/enco/core/src/AsmCode.h +++ b/compiler/enco/core/src/AsmCode.h @@ -27,7 +27,7 @@ class AsmCode { public: AsmCode(const std::string &filename, const std::string &varname) - : _filename{filename}, _varname{varname} + : _filename{filename}, _varname{varname} { // DO NOTHING } diff --git a/compiler/enco/core/src/Backend.cpp b/compiler/enco/core/src/Backend.cpp index d4bec7447..77374fecd 100644 --- a/compiler/enco/core/src/Backend.cpp +++ b/compiler/enco/core/src/Backend.cpp @@ -44,13 +44,12 @@ #include "Transforms/Split.h" #include "Transforms/GlobalDataGeneration.h" -#include <stdex/Memory.h> - +#include <memory> #include <stdexcept> #include <iostream> #include <fstream> -using stdex::make_unique; +using std::make_unique; using namespace enco; namespace @@ -168,7 +167,7 @@ void BackendImpl::compile(coco::Module *m, coco::Data *d) ofs << CppCode{data_var, code(sess)} << std::endl; } -} // namespace enco +} // namespace #include <iostream> diff --git a/compiler/enco/core/src/CodeIndex.h b/compiler/enco/core/src/CodeIndex.h index 7f2da6463..ed8f24109 100644 --- a/compiler/enco/core/src/CodeIndex.h +++ b/compiler/enco/core/src/CodeIndex.h @@ -30,7 +30,7 @@ public: public: CodeIndex(const coco::BlockIndex &blk_ind, const coco::InstrIndex &ins_ind) - : _blk_ind{blk_ind}, _ins_ind{ins_ind} + : _blk_ind{blk_ind}, _ins_ind{ins_ind} { } diff --git a/compiler/enco/core/src/CppGen/Host.cpp b/compiler/enco/core/src/CppGen/Host.cpp index 37e0583d7..7f9456239 100644 --- a/compiler/enco/core/src/CppGen/Host.cpp +++ b/compiler/enco/core/src/CppGen/Host.cpp @@ -18,8 +18,7 @@ #include <pp/EnclosedDocument.h> -#include <stdex/Memory.h> - +#include <memory> #include <map> #include <string> @@ -157,7 +156,7 @@ public: public: TransferLoop(uint32_t count, uint32_t src_step, uint32_t dst_step) - : _count{count}, _step{src_step, dst_step} + : _count{count}, _step{src_step, dst_step} { // DO NOTHING } @@ -293,7 +292,7 @@ std::unique_ptr<pp::MultiLineText> HostBlockCompiler::compile(const coco::Block { InstrPrinter prn{_mem}; - auto res = stdex::make_unique<pp::LinearDocument>(); + auto res = std::make_unique<pp::LinearDocument>(); for (auto ins = blk->instr()->head(); ins; ins = ins->next()) { diff --git a/compiler/enco/core/src/CppGen/Subnet.cpp b/compiler/enco/core/src/CppGen/Subnet.cpp index 9a636c6ae..599b0794e 100644 --- a/compiler/enco/core/src/CppGen/Subnet.cpp +++ b/compiler/enco/core/src/CppGen/Subnet.cpp @@ -21,11 +21,10 @@ #include <pp/LinearDocument.h> -#include <stdex/Memory.h> - +#include <memory> #include <sstream> -using stdex::make_unique; +using std::make_unique; using enco::concat; #define S(content) #content @@ -117,7 +116,7 @@ class ScalarOperandDecl final : public CodeFragment { public: ScalarOperandDecl(const std::string &model, const ann::DType &dtype) - : _model{model}, _dtype{dtype} + : _model{model}, _dtype{dtype} { // DO NOTHING } @@ -150,7 +149,7 @@ class TensorOperandDecl final : public CodeFragment public: TensorOperandDecl(const std::string &model, const ann::DType &dtype, const nncc::core::ADT::tensor::Shape &shape) - : _model{model}, _dtype{dtype}, _shape{shape} + : _model{model}, _dtype{dtype}, _shape{shape} { // DO NOTHING } @@ -194,7 +193,7 @@ class WeightDecl final : public CodeFragment public: WeightDecl(const std::string &model, const ann::OperandID &id, const std::string &base, const std::string &size) - : _model{model}, _id{id}, _base{base}, _size{size} + : _model{model}, _id{id}, _base{base}, _size{size} { // DO NOTHING } diff --git a/compiler/enco/core/src/Session.cpp b/compiler/enco/core/src/Session.cpp index 034f23892..18af87ace 100644 --- a/compiler/enco/core/src/Session.cpp +++ b/compiler/enco/core/src/Session.cpp @@ -16,12 +16,10 @@ #include "Session.h" -#include <stdex/Memory.h> - #include <map> #include <memory> -using stdex::make_unique; +using std::make_unique; namespace { diff --git a/compiler/enco/core/src/Support/Debugging.cpp b/compiler/enco/core/src/Support/Debugging.cpp index bd65a27d8..9a9a7745e 100644 --- a/compiler/enco/core/src/Support/Debugging.cpp +++ b/compiler/enco/core/src/Support/Debugging.cpp @@ -77,7 +77,7 @@ pp::LinearDocument operator<<(const SectionBuilder &builder, Callback cb) } SectionBuilder section(const std::string &tag) { return SectionBuilder{tag}; } -} +} // namespace /** * SECTION: Bag diff --git a/compiler/enco/core/src/Transforms/FeatureUnification.cpp b/compiler/enco/core/src/Transforms/FeatureUnification.cpp index 1a7a0a8a4..9e4a8e19f 100644 --- a/compiler/enco/core/src/Transforms/FeatureUnification.cpp +++ b/compiler/enco/core/src/Transforms/FeatureUnification.cpp @@ -17,14 +17,13 @@ #include "FeatureUnification.h" #include "IRUtils.h" -#include <stdex/Memory.h> - +#include <memory> #include <set> #include <vector> #include <cassert> -using stdex::make_unique; +using std::make_unique; namespace { diff --git a/compiler/enco/core/src/Transforms/GlobalDataGeneration.cpp b/compiler/enco/core/src/Transforms/GlobalDataGeneration.cpp index 152477a51..cb5a0a9a9 100644 --- a/compiler/enco/core/src/Transforms/GlobalDataGeneration.cpp +++ b/compiler/enco/core/src/Transforms/GlobalDataGeneration.cpp @@ -18,11 +18,10 @@ #include "Split.h" #include "Dims.h" -#include <stdex/Memory.h> - +#include <memory> #include <map> -using stdex::make_unique; +using std::make_unique; namespace { diff --git a/compiler/enco/core/src/Transforms/Split.cpp b/compiler/enco/core/src/Transforms/Split.cpp index b57b8f882..714c27a72 100644 --- a/compiler/enco/core/src/Transforms/Split.cpp +++ b/compiler/enco/core/src/Transforms/Split.cpp @@ -22,13 +22,13 @@ #include <coco/IR.h> #include <nncc/core/ADT/kernel/NHWCLayout.h> -#include <stdex/Memory.h> +#include <memory> #include <map> #include <stdexcept> #include <functional> -using stdex::make_unique; +using std::make_unique; namespace { @@ -337,8 +337,8 @@ public: auto ofm = binder->addOperand<float>(_ofm); binder->addOperation( - ann::Operation::Code::DEPTHWISE_CONV_2D, - {ifm, ker, bias, left, right, top, bottom, hstride, vstride, multiplier, fuse}, {ofm}); + ann::Operation::Code::DEPTHWISE_CONV_2D, + {ifm, ker, bias, left, right, top, bottom, hstride, vstride, multiplier, fuse}, {ofm}); } private: diff --git a/compiler/enco/core/src/Transforms/Split.h b/compiler/enco/core/src/Transforms/Split.h index b4e1d7baf..85ad2684f 100644 --- a/compiler/enco/core/src/Transforms/Split.h +++ b/compiler/enco/core/src/Transforms/Split.h @@ -43,6 +43,6 @@ struct PhaseConstructionPass final : public Pass void run(const SessionID &sess) const override { split_into_phases(code(sess)); } }; -} // namespace enco; +} // namespace enco #endif // __SPLIT_H__ diff --git a/compiler/enco/frontend/caffe/CMakeLists.txt b/compiler/enco/frontend/caffe/CMakeLists.txt index ce43a41d3..9722392a1 100644 --- a/compiler/enco/frontend/caffe/CMakeLists.txt +++ b/compiler/enco/frontend/caffe/CMakeLists.txt @@ -16,7 +16,6 @@ target_link_libraries(enco_caffe_frontend enco_intf_frontend) target_link_libraries(enco_caffe_frontend enco_intf_cmdline) target_link_libraries(enco_caffe_frontend morph) target_link_libraries(enco_caffe_frontend caffeproto) -target_link_libraries(enco_caffe_frontend stdex) nnas_find_package(GTest QUIET) diff --git a/compiler/enco/frontend/caffe/src/Context.h b/compiler/enco/frontend/caffe/src/Context.h index aca57ce6f..7cf27ead4 100644 --- a/compiler/enco/frontend/caffe/src/Context.h +++ b/compiler/enco/frontend/caffe/src/Context.h @@ -81,8 +81,8 @@ public: explicit GraphBuilderContext(coco::Module *module, coco::Data *data, coco::Block *block, ShapeContext &shape_ctx, StoreContext &bag_ctx, WeightContext &weight_ctx) - : _module(module), _data(data), _block(block), _shape_ctx(shape_ctx), _bag_ctx(bag_ctx), - _weight_ctx(weight_ctx) + : _module(module), _data(data), _block(block), _shape_ctx(shape_ctx), _bag_ctx(bag_ctx), + _weight_ctx(weight_ctx) { // DO NOTHING } diff --git a/compiler/enco/frontend/caffe/src/Entry.cpp b/compiler/enco/frontend/caffe/src/Entry.cpp index 2bdb73eac..41e174bc4 100644 --- a/compiler/enco/frontend/caffe/src/Entry.cpp +++ b/compiler/enco/frontend/caffe/src/Entry.cpp @@ -19,8 +19,7 @@ #include <cmdline/View.h> -#include <stdex/Memory.h> - +#include <memory> #include <fstream> #include <cassert> @@ -28,7 +27,7 @@ extern "C" std::unique_ptr<enco::Frontend> make_frontend(const cmdline::View &cm { assert(cmdline.size() == 2); - auto frontend = stdex::make_unique<Frontend>(); + auto frontend = std::make_unique<Frontend>(); // Fill prototxt { diff --git a/compiler/enco/frontend/caffe/src/GraphBuilderRegistry.cpp b/compiler/enco/frontend/caffe/src/GraphBuilderRegistry.cpp index e9db31177..d9a1c9617 100644 --- a/compiler/enco/frontend/caffe/src/GraphBuilderRegistry.cpp +++ b/compiler/enco/frontend/caffe/src/GraphBuilderRegistry.cpp @@ -25,9 +25,9 @@ #include "Layer/Scale.h" #include "Layer/BatchNorm.h" -#include <stdex/Memory.h> +#include <memory> -using stdex::make_unique; +using std::make_unique; namespace caffeimport { diff --git a/compiler/enco/frontend/caffe/src/Layer/Convolution.cpp b/compiler/enco/frontend/caffe/src/Layer/Convolution.cpp index 9fb096d49..807cce44d 100644 --- a/compiler/enco/frontend/caffe/src/Layer/Convolution.cpp +++ b/compiler/enco/frontend/caffe/src/Layer/Convolution.cpp @@ -101,7 +101,7 @@ void ConvolutionBuilder::build(const ::caffe::LayerParameter &layer, auto ker_dst = data->f32()->access(ker_obj); auto ker_src = kernel::OverlayFactory<float, kernel::NCHWLayout>::make( - ker_obj->shape(), ker_blob->mutable_data()->begin()); + ker_obj->shape(), ker_blob->mutable_data()->begin()); for (uint32_t n = 0; n < ker_obj->shape().count(); ++n) { diff --git a/compiler/enco/frontend/tflite/CMakeLists.txt b/compiler/enco/frontend/tflite/CMakeLists.txt index 77159879e..ea10fbc4b 100644 --- a/compiler/enco/frontend/tflite/CMakeLists.txt +++ b/compiler/enco/frontend/tflite/CMakeLists.txt @@ -19,7 +19,6 @@ target_link_libraries(enco_tflite_frontend enco_intf_frontend) target_link_libraries(enco_tflite_frontend enco_intf_cmdline) target_link_libraries(enco_tflite_frontend flatbuffers) target_link_libraries(enco_tflite_frontend enco_tflite_schema) -target_link_libraries(enco_tflite_frontend stdex) target_link_libraries(enco_tflite_frontend morph) target_link_libraries(enco_tflite_frontend cwrap) diff --git a/compiler/enco/frontend/tflite/src/Context.cpp b/compiler/enco/frontend/tflite/src/Context.cpp index ef030dc5d..588c3c44b 100644 --- a/compiler/enco/frontend/tflite/src/Context.cpp +++ b/compiler/enco/frontend/tflite/src/Context.cpp @@ -48,7 +48,7 @@ void TensorContext::prepare(const tflite::SubGraph *graph) } TflOpCodeContext::TflOpCodeContext( - const flatbuffers::Vector<flatbuffers::Offset<tflite::OperatorCode>> *opcodes) + const flatbuffers::Vector<flatbuffers::Offset<tflite::OperatorCode>> *opcodes) { for (const tflite::OperatorCode *opcode : *opcodes) { diff --git a/compiler/enco/frontend/tflite/src/Context.h b/compiler/enco/frontend/tflite/src/Context.h index f72385f9a..caeac4ab5 100644 --- a/compiler/enco/frontend/tflite/src/Context.h +++ b/compiler/enco/frontend/tflite/src/Context.h @@ -135,8 +135,8 @@ public: explicit GraphBuilderContext(coco::Module *m, coco::Data *d, coco::Block *block, TensorBags &tensor_bags, TensorContext &tensor_context, TflBufferContext &buffer_context, const tflite::SubGraph *graph) - : _m(m), _d(d), _block(block), _tensor_bags(tensor_bags), _tensor_context(tensor_context), - _buffer_context(buffer_context), _graph(graph) + : _m(m), _d(d), _block(block), _tensor_bags(tensor_bags), _tensor_context(tensor_context), + _buffer_context(buffer_context), _graph(graph) { // DO NOTHING } diff --git a/compiler/enco/frontend/tflite/src/Entry.cpp b/compiler/enco/frontend/tflite/src/Entry.cpp index c69e18074..74d3096ab 100644 --- a/compiler/enco/frontend/tflite/src/Entry.cpp +++ b/compiler/enco/frontend/tflite/src/Entry.cpp @@ -19,12 +19,11 @@ #include <cmdline/View.h> -#include <stdex/Memory.h> - +#include <memory> #include <fstream> #include <cassert> -using stdex::make_unique; +using std::make_unique; extern "C" std::unique_ptr<enco::Frontend> make_frontend(const cmdline::View &cmdline) { diff --git a/compiler/enco/frontend/tflite/src/Frontend.test.cpp b/compiler/enco/frontend/tflite/src/Frontend.test.cpp index aee6099e7..1bc774629 100644 --- a/compiler/enco/frontend/tflite/src/Frontend.test.cpp +++ b/compiler/enco/frontend/tflite/src/Frontend.test.cpp @@ -16,11 +16,11 @@ #include "Frontend.h" -#include <stdex/Memory.h> +#include <memory> #include <gtest/gtest.h> -using stdex::make_unique; +using std::make_unique; namespace { diff --git a/compiler/enco/frontend/tflite/src/GraphBuilderRegistry.h b/compiler/enco/frontend/tflite/src/GraphBuilderRegistry.h index 1ae882e89..ca4f74fc5 100644 --- a/compiler/enco/frontend/tflite/src/GraphBuilderRegistry.h +++ b/compiler/enco/frontend/tflite/src/GraphBuilderRegistry.h @@ -29,11 +29,11 @@ #include "Op/Div.h" #include <schema_generated.h> -#include <stdex/Memory.h> +#include <memory> #include <map> -using stdex::make_unique; +using std::make_unique; namespace tflimport { @@ -68,7 +68,7 @@ private: // add GraphBuilder for each tflite operation. _builder_map[tflite::BuiltinOperator_CONV_2D] = make_unique<Conv2DGraphBuilder>(); _builder_map[tflite::BuiltinOperator_DEPTHWISE_CONV_2D] = - make_unique<DepthwiseConv2DGraphBuilder>(); + make_unique<DepthwiseConv2DGraphBuilder>(); _builder_map[tflite::BuiltinOperator_AVERAGE_POOL_2D] = make_unique<AvgPool2DGraphBuilder>(); _builder_map[tflite::BuiltinOperator_MAX_POOL_2D] = make_unique<MaxPool2DGraphBuilder>(); _builder_map[tflite::BuiltinOperator_CONCATENATION] = make_unique<ConcatenationGraphBuilder>(); diff --git a/compiler/enco/frontend/tflite/src/Op/AveragePool2D.cpp b/compiler/enco/frontend/tflite/src/Op/AveragePool2D.cpp index 16f68fcdb..6f8223f10 100644 --- a/compiler/enco/frontend/tflite/src/Op/AveragePool2D.cpp +++ b/compiler/enco/frontend/tflite/src/Op/AveragePool2D.cpp @@ -102,7 +102,7 @@ void AvgPool2DGraphBuilder::build(const tflite::Operator *op, GraphBuilderContex coco_avgpool2d->stride()->horizontal(params->stride_w()); coco::Padding2D padding = - pool2D_padding(params, ifm_shape, params->filter_width(), params->filter_height()); + pool2D_padding(params, ifm_shape, params->filter_width(), params->filter_height()); coco_avgpool2d->pad()->top(padding.top()); coco_avgpool2d->pad()->bottom(padding.bottom()); diff --git a/compiler/enco/frontend/tflite/src/Op/Conv2D.cpp b/compiler/enco/frontend/tflite/src/Op/Conv2D.cpp index e9516c0e9..d1f97597f 100644 --- a/compiler/enco/frontend/tflite/src/Op/Conv2D.cpp +++ b/compiler/enco/frontend/tflite/src/Op/Conv2D.cpp @@ -171,7 +171,7 @@ void Conv2DGraphBuilder::build(const tflite::Operator *op, GraphBuilderContext * // fused activation coco::FeatureObject *act_output = - build_activation(conv_params->fused_activation_function(), blk, last_obj); + build_activation(conv_params->fused_activation_function(), blk, last_obj); // Create Copy Instr of last_obj to Output Object auto copy_ins = instr_builder(m).copy(ofm_obj, act_output); diff --git a/compiler/enco/frontend/tflite/src/Op/DepthwiseConv2D.cpp b/compiler/enco/frontend/tflite/src/Op/DepthwiseConv2D.cpp index e3d7b263e..bc903c380 100644 --- a/compiler/enco/frontend/tflite/src/Op/DepthwiseConv2D.cpp +++ b/compiler/enco/frontend/tflite/src/Op/DepthwiseConv2D.cpp @@ -138,8 +138,8 @@ void DepthwiseConv2DGraphBuilder::build(const tflite::Operator *op, auto wc = new_shape.width() * new_shape.depth(); ker_spn[n * hwc + h * wc + w * new_shape.depth() + c] = - buffer.ptr[tfl_n * hw * new_shape.count() + /* new_shape.count() is old c */ - h * new_shape.width() * new_shape.count() + w * new_shape.count() + tfl_c]; + buffer.ptr[tfl_n * hw * new_shape.count() + /* new_shape.count() is old c */ + h * new_shape.width() * new_shape.count() + w * new_shape.count() + tfl_c]; } } } @@ -220,7 +220,7 @@ void DepthwiseConv2DGraphBuilder::build(const tflite::Operator *op, // fused activation coco::FeatureObject *act_output = - build_activation(dconv_params->fused_activation_function(), blk, last_obj); + build_activation(dconv_params->fused_activation_function(), blk, last_obj); // Create Copy Instr of last_obj to Output Object auto copy_ins = instr_builder(m).copy(ofm_obj, act_output); diff --git a/compiler/enco/frontend/tflite/src/Op/MaxPool2D.cpp b/compiler/enco/frontend/tflite/src/Op/MaxPool2D.cpp index ee4406425..41e0cde17 100644 --- a/compiler/enco/frontend/tflite/src/Op/MaxPool2D.cpp +++ b/compiler/enco/frontend/tflite/src/Op/MaxPool2D.cpp @@ -99,7 +99,7 @@ void MaxPool2DGraphBuilder::build(const tflite::Operator *op, GraphBuilderContex coco_maxpool2d->stride()->horizontal(params->stride_w()); coco::Padding2D padding = - pool2D_padding(params, ifm_shape, params->filter_width(), params->filter_height()); + pool2D_padding(params, ifm_shape, params->filter_width(), params->filter_height()); coco_maxpool2d->pad()->top(padding.top()); coco_maxpool2d->pad()->bottom(padding.bottom()); diff --git a/compiler/enco/test/basic/000/CMakeLists.txt b/compiler/enco/test/basic/000/CMakeLists.txt index 20ba3c571..95e9cb0b0 100644 --- a/compiler/enco/test/basic/000/CMakeLists.txt +++ b/compiler/enco/test/basic/000/CMakeLists.txt @@ -11,7 +11,6 @@ set(LIB_TARGET ${PREFIX}-lib) add_library(${PREFIX}-frontend SHARED enco.test.cpp) target_link_libraries(${PREFIX}-frontend enco_intf_cmdline) target_link_libraries(${PREFIX}-frontend enco_intf_frontend) -target_link_libraries(${PREFIX}-frontend stdex) # NOTE BYPRODUCTS are not specified in order to enforce source code generation add_custom_command(OUTPUT ${GENERATED_CPP} ${GENERATED_ASM} ${GENERATED_BIN} diff --git a/compiler/enco/test/basic/000/enco.test.cpp b/compiler/enco/test/basic/000/enco.test.cpp index 3dbf96613..84c28d0f7 100644 --- a/compiler/enco/test/basic/000/enco.test.cpp +++ b/compiler/enco/test/basic/000/enco.test.cpp @@ -19,7 +19,7 @@ #include <nncc/core/ADT/tensor/LexicalLayout.h> -#include <stdex/Memory.h> +#include <memory> using namespace nncc::core::ADT; @@ -77,5 +77,5 @@ struct Frontend final : public enco::Frontend extern "C" std::unique_ptr<enco::Frontend> make_frontend(const cmdline::View &cmdline) { - return stdex::make_unique<Frontend>(); + return std::make_unique<Frontend>(); } diff --git a/compiler/enco/test/binder.cpp b/compiler/enco/test/binder.cpp index c8c72fc8b..f04cfa4f6 100644 --- a/compiler/enco/test/binder.cpp +++ b/compiler/enco/test/binder.cpp @@ -46,9 +46,9 @@ void Network_invoke(Network *net); #include <nncc/core/ADT/tensor/LexicalLayout.h> #include <nncc/core/ADT/tensor/Overlay.h> -#include <stdex/Memory.h> +#include <memory> -using stdex::make_unique; +using std::make_unique; using namespace nncc::core::ADT; namespace diff --git a/compiler/enco/test/caffe/CMakeLists.txt b/compiler/enco/test/caffe/CMakeLists.txt index ee49b6b28..d552d6ec8 100644 --- a/compiler/enco/test/caffe/CMakeLists.txt +++ b/compiler/enco/test/caffe/CMakeLists.txt @@ -123,7 +123,6 @@ foreach(PREFIX IN ITEMS ${CANDIDATES}) target_link_libraries(${BINDER_TARGET} nnkit_intf_backend) target_link_libraries(${BINDER_TARGET} ann_api) target_link_libraries(${BINDER_TARGET} ann_ref_static) - target_link_libraries(${BINDER_TARGET} stdex) set_target_properties(${BINDER_TARGET} PROPERTIES OUTPUT_NAME ${PREFIX}) list(APPEND TESTS ${PREFIX}) diff --git a/compiler/enco/test/tflite/CMakeLists.txt b/compiler/enco/test/tflite/CMakeLists.txt index d5a96a6da..81d5ed2a2 100644 --- a/compiler/enco/test/tflite/CMakeLists.txt +++ b/compiler/enco/test/tflite/CMakeLists.txt @@ -90,7 +90,6 @@ foreach(PREFIX IN ITEMS ${CANDIDATES}) target_link_libraries(${BINDER_TARGET} nnkit_intf_backend) target_link_libraries(${BINDER_TARGET} ann_api) target_link_libraries(${BINDER_TARGET} ann_ref_static) - target_link_libraries(${BINDER_TARGET} stdex) set_target_properties(${BINDER_TARGET} PROPERTIES OUTPUT_NAME ${PREFIX}) list(APPEND TESTS ${PREFIX}) |