From 50dbd62beadafbcd9687488c3e5ea0b52cc79afc Mon Sep 17 00:00:00 2001 From: Guoyu Wang Date: Fri, 29 Jan 2021 22:43:13 -0800 Subject: [PATCH 1/4] [CoreML EP] Add support of Conv operator --- onnxruntime/core/providers/common.h | 3 +- .../builders/impl/activation_op_builder.cc | 6 +- .../coreml/builders/impl/base_op_builder.cc | 14 +- .../coreml/builders/impl/base_op_builder.h | 2 + .../coreml/builders/impl/binary_op_builder.cc | 3 +- .../coreml/builders/impl/conv_op_builder.cc | 144 ++++++++++++++++++ .../builders/impl/transpose_op_builder.cc | 3 +- .../coreml/builders/op_builder_factory.cc | 4 + .../coreml/builders/op_builder_factory.h | 1 + .../nnapi_lib/NeuralNetworksWrapper.cc | 3 +- .../core/providers/shared/utils/utils.cc | 7 + .../core/providers/shared/utils/utils.h | 7 +- .../test/providers/cpu/nn/conv_op_test.cc | 12 +- 13 files changed, 185 insertions(+), 24 deletions(-) create mode 100644 onnxruntime/core/providers/coreml/builders/impl/conv_op_builder.cc diff --git a/onnxruntime/core/providers/common.h b/onnxruntime/core/providers/common.h index 17dfb39a3f883..3688133c6d8e3 100644 --- a/onnxruntime/core/providers/common.h +++ b/onnxruntime/core/providers/common.h @@ -140,9 +140,10 @@ inline bool Contains(const Map& map, const Key& key) { return map.find(key) != map.end(); } +// Note: This helper function will not have overflow protection template