Implement Passes in nnc (#1474)
authorРоман Михайлович Русяев/AI Tools Lab /SRR/Staff Engineer/삼성전자 <r.rusyaev@samsung.com>
Wed, 12 Sep 2018 16:34:28 +0000 (19:34 +0300)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Wed, 12 Sep 2018 16:34:28 +0000 (19:34 +0300)
commit1c163997abfe99353bba6f22b8425aeb45911858
tree0265762481f37190a29b7552d712d287fbd7d47e
parent60e630048b879c8a4a094a3e426f748b6caeac42
Implement Passes in nnc (#1474)

* implement passes system
* remove plugins

Signed-off-by: Roman Rusyaev <r.rusyaev@samsung.com>
153 files changed:
contrib/nnc/CMakeLists.txt
contrib/nnc/README.md
contrib/nnc/core/CMakeLists.txt
contrib/nnc/driver/Driver.cpp
contrib/nnc/driver/Driver.h
contrib/nnc/driver/main.cpp
contrib/nnc/examples/caffe_frontend/model_dump.cpp
contrib/nnc/examples/plugin/CMakeLists.txt [deleted file]
contrib/nnc/examples/plugin/samplePlugin.cpp [deleted file]
contrib/nnc/examples/tflite_frontend/sanity_check.cpp
contrib/nnc/include/Definitions.h.in
contrib/nnc/include/pass/Pass.h [new file with mode: 0644]
contrib/nnc/include/pass/PassData.h [new file with mode: 0644]
contrib/nnc/include/pass/PassException.h [new file with mode: 0644]
contrib/nnc/include/pass/PassManager.h [new file with mode: 0644]
contrib/nnc/include/passes/caffe_frontend/CaffeFrontend.h [new file with mode: 0644]
contrib/nnc/include/passes/common_frontend/model_allocation.h [moved from contrib/nnc/include/plugin/common_frontend/model_allocation.h with 100% similarity]
contrib/nnc/include/passes/common_frontend/nn_importer.h [moved from contrib/nnc/include/plugin/common_frontend/nn_importer.h with 100% similarity]
contrib/nnc/include/passes/common_frontend/shape_helper.h [moved from contrib/nnc/include/plugin/common_frontend/shape_helper.h with 100% similarity]
contrib/nnc/include/passes/interpreter/Interpreter.h [moved from contrib/nnc/include/plugin/interpreter/Interpreter.h with 100% similarity]
contrib/nnc/include/passes/interpreter/InterpreterPass.h [new file with mode: 0644]
contrib/nnc/include/passes/soft_backend/BaseGenerator.h [moved from contrib/nnc/plugin/soft_backend/base_generator.h with 84% similarity]
contrib/nnc/include/passes/soft_backend/CGenerator.h [moved from contrib/nnc/plugin/soft_backend/c_generator.h with 85% similarity]
contrib/nnc/include/passes/soft_backend/CPPGenerator.h [moved from contrib/nnc/plugin/soft_backend/cpp_generator.h with 91% similarity]
contrib/nnc/include/passes/tflite_frontend/TfliteFrontend.h [new file with mode: 0644]
contrib/nnc/include/support/CommandLine.h
contrib/nnc/include/support/PluginException.h [deleted file]
contrib/nnc/include/support/PluginInstance.h [deleted file]
contrib/nnc/include/support/PluginManager.h [deleted file]
contrib/nnc/include/support/PluginProxy.h [deleted file]
contrib/nnc/include/support/shared_library.h [deleted file]
contrib/nnc/pass/CMakeLists.txt [new file with mode: 0644]
contrib/nnc/pass/PassManager.cpp [new file with mode: 0644]
contrib/nnc/passes/CMakeLists.txt [moved from contrib/nnc/plugin/CMakeLists.txt with 100% similarity]
contrib/nnc/passes/caffe_frontend/CMakeLists.txt [moved from contrib/nnc/plugin/caffe_frontend/CMakeLists.txt with 82% similarity]
contrib/nnc/passes/caffe_frontend/caffe_dump_visitor.cpp [moved from contrib/nnc/plugin/caffe_frontend/caffe_dump_visitor.cpp with 100% similarity]
contrib/nnc/passes/caffe_frontend/caffe_dump_visitor.h [moved from contrib/nnc/plugin/caffe_frontend/caffe_dump_visitor.h with 100% similarity]
contrib/nnc/passes/caffe_frontend/caffe_frontend.cpp [new file with mode: 0644]
contrib/nnc/passes/caffe_frontend/caffe_importer.cpp [moved from contrib/nnc/plugin/caffe_frontend/caffe_importer.cpp with 96% similarity]
contrib/nnc/passes/caffe_frontend/caffe_importer.h [moved from contrib/nnc/plugin/caffe_frontend/caffe_importer.h with 89% similarity]
contrib/nnc/passes/caffe_frontend/caffe_model_visitor.cpp [moved from contrib/nnc/plugin/caffe_frontend/caffe_model_visitor.cpp with 95% similarity]
contrib/nnc/passes/caffe_frontend/caffe_model_visitor.h [moved from contrib/nnc/plugin/caffe_frontend/caffe_model_visitor.h with 100% similarity]
contrib/nnc/passes/caffe_frontend/caffe_op_creator.cpp [moved from contrib/nnc/plugin/caffe_frontend/caffe_op_creator.cpp with 93% similarity]
contrib/nnc/passes/caffe_frontend/caffe_op_creator.h [moved from contrib/nnc/plugin/caffe_frontend/caffe_op_creator.h with 98% similarity]
contrib/nnc/passes/caffe_frontend/caffe_visitor.h [moved from contrib/nnc/plugin/caffe_frontend/caffe_visitor.h with 100% similarity]
contrib/nnc/passes/caffe_frontend/caffe_walker.cpp [moved from contrib/nnc/plugin/caffe_frontend/caffe_walker.cpp with 100% similarity]
contrib/nnc/passes/caffe_frontend/caffe_walker.h [moved from contrib/nnc/plugin/caffe_frontend/caffe_walker.h with 100% similarity]
contrib/nnc/passes/caffe_frontend/proto_reader.cpp [moved from contrib/nnc/plugin/caffe_frontend/proto_reader.cpp with 100% similarity]
contrib/nnc/passes/caffe_frontend/proto_reader.h [moved from contrib/nnc/plugin/caffe_frontend/proto_reader.h with 100% similarity]
contrib/nnc/passes/common_frontend/CMakeLists.txt [moved from contrib/nnc/plugin/common_frontend/CMakeLists.txt with 100% similarity]
contrib/nnc/passes/common_frontend/model_allocation.cpp [moved from contrib/nnc/plugin/common_frontend/model_allocation.cpp with 94% similarity]
contrib/nnc/passes/common_frontend/shape_helper.cpp [new file with mode: 0644]
contrib/nnc/passes/interpreter/CMakeLists.txt [moved from contrib/nnc/plugin/interpreter/CMakeLists.txt with 75% similarity]
contrib/nnc/passes/interpreter/Interpreter.cpp [moved from contrib/nnc/plugin/interpreter/Interpreter.cpp with 99% similarity]
contrib/nnc/passes/interpreter/interpreter_pass.cpp [moved from contrib/nnc/plugin/interpreter/interpreter_plugin.cpp with 82% similarity]
contrib/nnc/passes/interpreter/ops/Bias.cpp [moved from contrib/nnc/plugin/interpreter/ops/Bias.cpp with 100% similarity]
contrib/nnc/passes/interpreter/ops/Bias.h [moved from contrib/nnc/plugin/interpreter/ops/Bias.h with 100% similarity]
contrib/nnc/passes/interpreter/ops/Concat.cpp [moved from contrib/nnc/plugin/interpreter/ops/Concat.cpp with 100% similarity]
contrib/nnc/passes/interpreter/ops/Concat.h [moved from contrib/nnc/plugin/interpreter/ops/Concat.h with 100% similarity]
contrib/nnc/passes/interpreter/ops/Depthwise_conv_2D.cpp [moved from contrib/nnc/plugin/interpreter/ops/Depthwise_conv_2D.cpp with 100% similarity]
contrib/nnc/passes/interpreter/ops/Depthwise_conv_2D.h [moved from contrib/nnc/plugin/interpreter/ops/Depthwise_conv_2D.h with 100% similarity]
contrib/nnc/passes/interpreter/ops/Elementwise.cpp [moved from contrib/nnc/plugin/interpreter/ops/Elementwise.cpp with 100% similarity]
contrib/nnc/passes/interpreter/ops/Elementwise.h [moved from contrib/nnc/plugin/interpreter/ops/Elementwise.h with 100% similarity]
contrib/nnc/passes/interpreter/ops/Fill.cpp [moved from contrib/nnc/plugin/interpreter/ops/Fill.cpp with 100% similarity]
contrib/nnc/passes/interpreter/ops/Fill.h [moved from contrib/nnc/plugin/interpreter/ops/Fill.h with 100% similarity]
contrib/nnc/passes/interpreter/ops/FullyConnected.cpp [moved from contrib/nnc/plugin/interpreter/ops/FullyConnected.cpp with 100% similarity]
contrib/nnc/passes/interpreter/ops/FullyConnected.h [moved from contrib/nnc/plugin/interpreter/ops/FullyConnected.h with 100% similarity]
contrib/nnc/passes/interpreter/ops/OperationImpl.h [moved from contrib/nnc/plugin/interpreter/ops/OperationImpl.h with 100% similarity]
contrib/nnc/passes/interpreter/ops/Pool.cpp [moved from contrib/nnc/plugin/interpreter/ops/Pool.cpp with 100% similarity]
contrib/nnc/passes/interpreter/ops/Pool.h [moved from contrib/nnc/plugin/interpreter/ops/Pool.h with 100% similarity]
contrib/nnc/passes/interpreter/ops/Reduce.cpp [moved from contrib/nnc/plugin/interpreter/ops/Reduce.cpp with 100% similarity]
contrib/nnc/passes/interpreter/ops/Reduce.h [moved from contrib/nnc/plugin/interpreter/ops/Reduce.h with 100% similarity]
contrib/nnc/passes/interpreter/ops/Reshape.cpp [moved from contrib/nnc/plugin/interpreter/ops/Reshape.cpp with 100% similarity]
contrib/nnc/passes/interpreter/ops/Reshape.h [moved from contrib/nnc/plugin/interpreter/ops/Reshape.h with 100% similarity]
contrib/nnc/passes/interpreter/ops/Softmax.cpp [moved from contrib/nnc/plugin/interpreter/ops/Softmax.cpp with 100% similarity]
contrib/nnc/passes/interpreter/ops/Softmax.h [moved from contrib/nnc/plugin/interpreter/ops/Softmax.h with 100% similarity]
contrib/nnc/passes/interpreter/ops/common.cpp [moved from contrib/nnc/plugin/interpreter/ops/common.cpp with 100% similarity]
contrib/nnc/passes/interpreter/ops/common.h [moved from contrib/nnc/plugin/interpreter/ops/common.h with 100% similarity]
contrib/nnc/passes/interpreter/ops/conv_2D.cpp [moved from contrib/nnc/plugin/interpreter/ops/conv_2D.cpp with 100% similarity]
contrib/nnc/passes/interpreter/ops/conv_2D.h [moved from contrib/nnc/plugin/interpreter/ops/conv_2D.h with 100% similarity]
contrib/nnc/passes/interpreter/ops/conv_FFT.cpp [moved from contrib/nnc/plugin/interpreter/ops/conv_FFT.cpp with 100% similarity]
contrib/nnc/passes/interpreter/ops/conv_FFT.h [moved from contrib/nnc/plugin/interpreter/ops/conv_FFT.h with 100% similarity]
contrib/nnc/passes/soft_backend/BaseGenerator.cpp [moved from contrib/nnc/plugin/soft_backend/base_generator.cpp with 83% similarity]
contrib/nnc/passes/soft_backend/CGenerator.cpp [moved from contrib/nnc/plugin/soft_backend/c_generator.cpp with 79% similarity]
contrib/nnc/passes/soft_backend/CMakeLists.txt [moved from contrib/nnc/plugin/soft_backend/CMakeLists.txt with 75% similarity]
contrib/nnc/passes/soft_backend/code_snippets/cpp_add_bias.def [moved from contrib/nnc/plugin/soft_backend/code_snippets/cpp_add_bias.def with 100% similarity]
contrib/nnc/passes/soft_backend/code_snippets/cpp_capped_relu.def [moved from contrib/nnc/plugin/soft_backend/code_snippets/cpp_capped_relu.def with 100% similarity]
contrib/nnc/passes/soft_backend/code_snippets/cpp_common_funcs.def [moved from contrib/nnc/plugin/soft_backend/code_snippets/cpp_common_funcs.def with 100% similarity]
contrib/nnc/passes/soft_backend/code_snippets/cpp_concat.def [moved from contrib/nnc/plugin/soft_backend/code_snippets/cpp_concat.def with 100% similarity]
contrib/nnc/passes/soft_backend/code_snippets/cpp_conv.def [moved from contrib/nnc/plugin/soft_backend/code_snippets/cpp_conv.def with 100% similarity]
contrib/nnc/passes/soft_backend/code_snippets/cpp_depthwise_conv.def [moved from contrib/nnc/plugin/soft_backend/code_snippets/cpp_depthwise_conv.def with 100% similarity]
contrib/nnc/passes/soft_backend/code_snippets/cpp_fully_connected.def [moved from contrib/nnc/plugin/soft_backend/code_snippets/cpp_fully_connected.def with 100% similarity]
contrib/nnc/passes/soft_backend/code_snippets/cpp_header_types.def [moved from contrib/nnc/plugin/soft_backend/code_snippets/cpp_header_types.def with 100% similarity]
contrib/nnc/passes/soft_backend/code_snippets/cpp_operations.def [moved from contrib/nnc/plugin/soft_backend/code_snippets/cpp_operations.def with 100% similarity]
contrib/nnc/passes/soft_backend/code_snippets/cpp_pool.def [moved from contrib/nnc/plugin/soft_backend/code_snippets/cpp_pool.def with 100% similarity]
contrib/nnc/passes/soft_backend/code_snippets/cpp_relu.def [moved from contrib/nnc/plugin/soft_backend/code_snippets/cpp_relu.def with 100% similarity]
contrib/nnc/passes/soft_backend/code_snippets/cpp_softmax.def [moved from contrib/nnc/plugin/soft_backend/code_snippets/cpp_softmax.def with 100% similarity]
contrib/nnc/passes/soft_backend/code_snippets/eigen.def [moved from contrib/nnc/plugin/soft_backend/code_snippets/eigen.def with 100% similarity]
contrib/nnc/passes/soft_backend/cpp_generator.cpp [moved from contrib/nnc/plugin/soft_backend/cpp_generator.cpp with 97% similarity]
contrib/nnc/passes/soft_backend/model_analyzer.cpp [moved from contrib/nnc/plugin/soft_backend/model_analyzer.cpp with 100% similarity]
contrib/nnc/passes/soft_backend/model_analyzer.h [moved from contrib/nnc/plugin/soft_backend/model_analyzer.h with 100% similarity]
contrib/nnc/passes/soft_backend/param_constants.def [moved from contrib/nnc/plugin/soft_backend/param_constants.def with 100% similarity]
contrib/nnc/passes/soft_backend/serializer.cpp [moved from contrib/nnc/plugin/soft_backend/serializer.cpp with 100% similarity]
contrib/nnc/passes/soft_backend/serializer.h [moved from contrib/nnc/plugin/soft_backend/serializer.h with 100% similarity]
contrib/nnc/passes/tflite_frontend/CMakeLists.txt [moved from contrib/nnc/plugin/tflite_frontend/CMakeLists.txt with 89% similarity]
contrib/nnc/passes/tflite_frontend/schema/schema.fbs [moved from contrib/nnc/plugin/tflite_frontend/schema/schema.fbs with 100% similarity]
contrib/nnc/passes/tflite_frontend/schema/schema.meta [moved from contrib/nnc/plugin/tflite_frontend/schema/schema.meta with 100% similarity]
contrib/nnc/passes/tflite_frontend/schema/schema_v0.fbs [moved from contrib/nnc/plugin/tflite_frontend/schema/schema_v0.fbs with 100% similarity]
contrib/nnc/passes/tflite_frontend/schema/schema_v0.meta [moved from contrib/nnc/plugin/tflite_frontend/schema/schema_v0.meta with 100% similarity]
contrib/nnc/passes/tflite_frontend/schema/schema_v1.fbs [moved from contrib/nnc/plugin/tflite_frontend/schema/schema_v1.fbs with 100% similarity]
contrib/nnc/passes/tflite_frontend/schema/schema_v1.meta [moved from contrib/nnc/plugin/tflite_frontend/schema/schema_v1.meta with 100% similarity]
contrib/nnc/passes/tflite_frontend/schema/schema_v2.fbs [moved from contrib/nnc/plugin/tflite_frontend/schema/schema_v2.fbs with 100% similarity]
contrib/nnc/passes/tflite_frontend/schema/schema_v2.meta [moved from contrib/nnc/plugin/tflite_frontend/schema/schema_v2.meta with 100% similarity]
contrib/nnc/passes/tflite_frontend/schema/schema_v3.fbs [moved from contrib/nnc/plugin/tflite_frontend/schema/schema_v3.fbs with 100% similarity]
contrib/nnc/passes/tflite_frontend/schema/schema_v3.meta [moved from contrib/nnc/plugin/tflite_frontend/schema/schema_v3.meta with 100% similarity]
contrib/nnc/passes/tflite_frontend/schema_v3.h [moved from contrib/nnc/plugin/tflite_frontend/schema_v3.h with 100% similarity]
contrib/nnc/passes/tflite_frontend/tflite_dump_visitor.cpp [moved from contrib/nnc/plugin/tflite_frontend/tflite_dump_visitor.cpp with 100% similarity]
contrib/nnc/passes/tflite_frontend/tflite_dump_visitor.h [moved from contrib/nnc/plugin/tflite_frontend/tflite_dump_visitor.h with 100% similarity]
contrib/nnc/passes/tflite_frontend/tflite_frontend.cpp [new file with mode: 0644]
contrib/nnc/passes/tflite_frontend/tflite_importer.inline.cpp [moved from contrib/nnc/plugin/tflite_frontend/tflite_importer.inline.cpp with 100% similarity]
contrib/nnc/passes/tflite_frontend/tflite_importer.inline.h [moved from contrib/nnc/plugin/tflite_frontend/tflite_importer.inline.h with 100% similarity]
contrib/nnc/passes/tflite_frontend/tflite_ir_visitor.cpp [moved from contrib/nnc/plugin/tflite_frontend/tflite_ir_visitor.cpp with 95% similarity]
contrib/nnc/passes/tflite_frontend/tflite_ir_visitor.h [moved from contrib/nnc/plugin/tflite_frontend/tflite_ir_visitor.h with 100% similarity]
contrib/nnc/passes/tflite_frontend/tflite_op_creator.cpp [moved from contrib/nnc/plugin/tflite_frontend/tflite_op_creator.cpp with 96% similarity]
contrib/nnc/passes/tflite_frontend/tflite_op_creator.h [moved from contrib/nnc/plugin/tflite_frontend/tflite_op_creator.h with 97% similarity]
contrib/nnc/passes/tflite_frontend/tflite_v3_importer.cpp [moved from contrib/nnc/plugin/tflite_frontend/tflite_v3_importer.cpp with 100% similarity]
contrib/nnc/passes/tflite_frontend/tflite_v3_importer.h [moved from contrib/nnc/plugin/tflite_frontend/tflite_v3_importer.h with 81% similarity]
contrib/nnc/passes/tflite_frontend/tflite_visitor.h [moved from contrib/nnc/plugin/tflite_frontend/tflite_visitor.h with 100% similarity]
contrib/nnc/passes/tflite_frontend/tflite_walker.cpp [moved from contrib/nnc/plugin/tflite_frontend/tflite_walker.cpp with 100% similarity]
contrib/nnc/passes/tflite_frontend/tflite_walker.h [moved from contrib/nnc/plugin/tflite_frontend/tflite_walker.h with 100% similarity]
contrib/nnc/plugin/caffe_frontend/caffe_plugin.cpp [deleted file]
contrib/nnc/plugin/common_frontend/shape_helper.cpp [deleted file]
contrib/nnc/plugin/interpreter/interpreter_plugin.h [deleted file]
contrib/nnc/plugin/tflite_frontend/tflite_plugin.cpp [deleted file]
contrib/nnc/support/CLOptionChecker.cpp
contrib/nnc/support/CMakeLists.txt
contrib/nnc/support/PluginManager.cpp [deleted file]
contrib/nnc/support/PluginProxy.cpp [deleted file]
contrib/nnc/tests/interpreter/graph_creator.cpp
contrib/nnc/tests/interpreter/op_info_util.h
contrib/nnc/tests/interpreter/op_test.cpp
contrib/nnc/tests/soft_backend/compile_cpp.cpp
contrib/nnc/unittests/CMakeLists.txt
contrib/nnc/unittests/module/CMakeLists.txt [deleted file]
contrib/nnc/unittests/module/PluginManager.cpp [deleted file]
contrib/nnc/unittests/module/PluginProxy.cpp [deleted file]
contrib/nnc/unittests/module/shared_library.cpp [deleted file]
contrib/nnc/unittests/pass/CMakeLists.txt [new file with mode: 0644]
contrib/nnc/unittests/pass/PassExceptionTest.cpp [new file with mode: 0644]
contrib/nnc/unittests/pass/PassManagerTest.cpp [new file with mode: 0644]
contrib/nnc/unittests/soft_backend/cpp_operations.cpp
contrib/nnc/unittests/soft_backend/generator.cpp
contrib/nnc/unittests/support/PluginException.cpp [deleted file]