| 1 | /* Copyright 2018 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_DELEGATES_VSI_NPU_CUSTOM_OP_H_ |
| 16 | #define TENSORFLOW_LITE_DELEGATES_VSI_NPU_CUSTOM_OP_H_ |
| 17 | |
| 18 | #include "tensorflow/lite/c/common.h" |
| 19 | |
| 20 | #ifdef __cplusplus |
| 21 | extern "C" { |
| 22 | #endif // __cplusplus |
| 23 | |
| 24 | static const char kNbgCustomOp[] = "vsi-npu"; |
| 25 | |
| 26 | typedef struct { |
| 27 | size_t length; |
| 28 | size_t input_count; |
| 29 | size_t output_cout; |
| 30 | char* binary; |
| 31 | } TfLiteVsiNpuParams; |
| 32 | |
| 33 | #ifdef __cplusplus |
| 34 | namespace tflite { |
| 35 | namespace ops { |
| 36 | namespace custom { |
| 37 | #endif // __cplusplus |
| 38 | |
| 39 | TfLiteRegistration* Register_VSI_NPU_PRECOMPILED(void); |
| 40 | |
| 41 | #ifdef __cplusplus |
| 42 | } // namespace custom |
| 43 | } // namespace ops |
| 44 | } // namespace tflite |
| 45 | |
| 46 | } // extern "C" |
| 47 | #endif // __cplusplus |
| 48 | |
| 49 | #endif //TENSORFLOW_LITE_DELEGATES_VSI_NPU_CUSTOM_OP_H_ |