1 /* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
2 
3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
6 
7     http://www.apache.org/licenses/LICENSE-2.0
8 
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14 ==============================================================================*/
15 #ifndef TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_OP_VALIDATOR_H_
16 #define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_OP_VALIDATOR_H_
17 
18 #include "tensorflow/lite/c/builtin_op_data.h"
19 
20 namespace tflite {
21 namespace delegates {
22 namespace coreml {
23 // Follow the ordering of TfLiteBuiltinOperator enum.
24 bool IsConcatenationOpSupported(const TfLiteRegistration* registration,
25                                 const TfLiteNode* node, TfLiteContext* context);
26 bool IsConvolutionOpSupported(const TfLiteRegistration* registration,
27                               const TfLiteNode* node, TfLiteContext* context);
28 bool IsDepthwiseConvolutionOpSupported(const TfLiteRegistration* registration,
29                                        const TfLiteNode* node,
30                                        TfLiteContext* context);
31 bool IsFullyConnectedOpSupported(const TfLiteRegistration* registration,
32                                  const TfLiteNode* node,
33                                  TfLiteContext* context);
34 bool IsMeanOpSupported(const TfLiteRegistration* registration,
35                        const TfLiteNode* node, TfLiteContext* context);
36 bool IsMirrorPadOpSupported(const TfLiteRegistration* registration,
37                             const TfLiteNode* node, TfLiteContext* context);
38 bool IsPadOpSupported(const TfLiteRegistration* registration,
39                       const TfLiteNode* node, TfLiteContext* context);
40 bool IsReshapeOpSupported(const TfLiteRegistration* registration,
41                           const TfLiteNode* node, TfLiteContext* context,
42                           int coreml_version);
43 bool IsResizeBilinearOpSupported(const TfLiteRegistration* registration,
44                                  const TfLiteNode* node,
45                                  TfLiteContext* context);
46 bool IsTransposeConvolutionOpSupported(const TfLiteRegistration* registration,
47                                        const TfLiteNode* node,
48                                        TfLiteContext* context);
49 }  // namespace coreml
50 }  // namespace delegates
51 }  // namespace tflite
52 
53 #endif  // TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_OP_VALIDATOR_H_
54