diff options
Diffstat (limited to 'libs/tflite/include/tflite/ext/kernels')
6 files changed, 0 insertions, 335 deletions
diff --git a/libs/tflite/include/tflite/ext/kernels/Abs.h b/libs/tflite/include/tflite/ext/kernels/Abs.h deleted file mode 100644 index 74e4aa658..000000000 --- a/libs/tflite/include/tflite/ext/kernels/Abs.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __NNFW_TFLITE_EXT_KERNELS_ABS_H__ -#define __NNFW_TFLITE_EXT_KERNELS_ABS_H__ - -#include "tensorflow/contrib/lite/context.h" - -namespace nnfw -{ -namespace tflite -{ -namespace custom -{ -namespace Abs -{ - -void *InitAbs(TfLiteContext *context, const char *buffer, size_t length); -void FreeAbs(TfLiteContext *context, void *buffer); -TfLiteStatus PrepareAbs(TfLiteContext *context, TfLiteNode *node); -TfLiteStatus EvalAbs(TfLiteContext *context, TfLiteNode *node); - -} // namespace Abs -} // namespace custom -} // namespace tflite -} // namespace nnfw - -#endif // __NNFW_TFLITE_EXT_KERNELS_ABS_H__ diff --git a/libs/tflite/include/tflite/ext/kernels/CustomOps.h b/libs/tflite/include/tflite/ext/kernels/CustomOps.h deleted file mode 100644 index 3f9459bb2..000000000 --- a/libs/tflite/include/tflite/ext/kernels/CustomOps.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file CustomOps.h - * @brief This file contains registration of custom operands - * @ingroup COM_AI_RUNTIME - */ - -#ifndef __NNFW_TFLITE_EXT_KERNELS_CUSTOM_OP_H__ -#define __NNFW_TFLITE_EXT_KERNELS_CUSTOM_OP_H__ - -#include "tensorflow/contrib/lite/context.h" -#include "tflite/ext/kernels/TensorFlowMax.h" -#include "tflite/ext/kernels/SquaredDifference.h" -#include "tflite/ext/kernels/TensorFlowSum.h" -#include "tflite/ext/kernels/Abs.h" - -namespace nnfw -{ -namespace tflite -{ -namespace custom -{ - -#define REGISTER_FUNCTION(Name) \ - TfLiteRegistration *Register_##Name(void) \ - { \ - static TfLiteRegistration r = { \ - Name::Init##Name, Name::Free##Name, Name::Prepare##Name, Name::Eval##Name, \ - }; \ - r.custom_name = #Name; \ - return &r; \ - } - -REGISTER_FUNCTION(TensorFlowMax) -REGISTER_FUNCTION(SquaredDifference) -REGISTER_FUNCTION(TensorFlowSum) -REGISTER_FUNCTION(Abs) - -#undef REGISTER_FUNCTION - -} // namespace custom -} // namespace tflite -} // namespace nnfw - -#endif // __NNFW_TFLITE_EXT_KERNELS_CUSTOM_OP_H__ diff --git a/libs/tflite/include/tflite/ext/kernels/SquaredDifference.h b/libs/tflite/include/tflite/ext/kernels/SquaredDifference.h deleted file mode 100644 index 492523c02..000000000 --- a/libs/tflite/include/tflite/ext/kernels/SquaredDifference.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file SquaredDifference.h - * @brief This file contains SquaredDifference namespace and SquaredDifference function - * definitions - * @ingroup COM_AI_RUNTIME - */ - -#ifndef __NNFW_TFLITE_EXT_KERNELS_SQUARED_DIFFERENCE_H__ -#define __NNFW_TFLITE_EXT_KERNELS_SQUARED_DIFFERENCE_H__ - -#include "tensorflow/contrib/lite/context.h" - -namespace nnfw -{ -namespace tflite -{ -namespace custom -{ -namespace SquaredDifference -{ - -/** - * @brief Initialize SquaredDifference operand using the contents of buffer - * @param[in] context The TfLite context - * @param[in] buffer The buffer with contents - * @param[in] length The buffer length - * @return The void pointer for user data - */ -void *InitSquaredDifference(TfLiteContext *context, const char *buffer, size_t length); - -/** - * @brief Release any memory it might have allocated via 'InitSquaredDifference' - * @param[in] context The TfLite context - * @param[in] buffer The buffer with contents - * @return N/A - */ -void FreeSquaredDifference(TfLiteContext *context, void *buffer); - -/** - * @brief Prepare the SquaredDifference operand for execution - * @param[in] context The TfLite context - * @param[in] node The operand node - * @return The TfLite status - */ -TfLiteStatus PrepareSquaredDifference(TfLiteContext *context, TfLiteNode *node); - -/** - * @brief Evaluation the SquaredDifference operand for execution - * @param[in] context The TfLite context - * @param[in] node The operand node - * @return The TfLite status - */ -TfLiteStatus EvalSquaredDifference(TfLiteContext *context, TfLiteNode *node); - -} // namespace SquaredDifference -} // namespace custom -} // namespace tflite -} // namespace nnfw - -#endif // __NNFW_TFLITE_EXT_KERNELS_SQUARED_DIFFERENCE_H__ diff --git a/libs/tflite/include/tflite/ext/kernels/TensorFlowMax.h b/libs/tflite/include/tflite/ext/kernels/TensorFlowMax.h deleted file mode 100644 index d31d76483..000000000 --- a/libs/tflite/include/tflite/ext/kernels/TensorFlowMax.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file TensorFlowMax.h - * @brief This file contains TensorFlowMax namespace and TensorFlowMax function definitions - * @ingroup COM_AI_RUNTIME - */ - -#ifndef __NNFW_TFLITE_EXT_KERNELS_TENSORFLOW_MAX_H__ -#define __NNFW_TFLITE_EXT_KERNELS_TENSORFLOW_MAX_H__ - -#include "tensorflow/contrib/lite/context.h" - -namespace nnfw -{ -namespace tflite -{ -namespace custom -{ -namespace TensorFlowMax -{ - -/** - * @brief Initialize TensorFlowMax operand using the contents of buffer - * @param[in] context The TfLite context - * @param[in] buffer The buffer with contents - * @param[in] length The buffer length - * @return The void pointer for user data - */ -void *InitTensorFlowMax(TfLiteContext *context, const char *buffer, size_t length); - -/** - * @brief Release any memory it might have allocated via 'InitTensorFlowMax' - * @param[in] context The TfLite context - * @param[in] buffer The buffer with contents - * @return N/A - */ -void FreeTensorFlowMax(TfLiteContext *context, void *buffer); - -/** - * @brief Prepare the TensorFlowMax operand for execution - * @param[in] context The TfLite context - * @param[in] node The operand node - * @return The TfLite status - */ -TfLiteStatus PrepareTensorFlowMax(TfLiteContext *context, TfLiteNode *node); - -/** - * @brief Evaluation the TensorFlowMax operand for execution - * @param[in] context The TfLite context - * @param[in] node The operand node - * @return The TfLite status - */ -TfLiteStatus EvalTensorFlowMax(TfLiteContext *context, TfLiteNode *node); - -} // namespace TensorFlowMax -} // namespace custom -} // namespace tflite -} // namespace nnfw - -#endif // __NNFW_TFLITE_EXT_KERNELS_TENSORFLOW_MAX_H__ diff --git a/libs/tflite/include/tflite/ext/kernels/TensorFlowSum.h b/libs/tflite/include/tflite/ext/kernels/TensorFlowSum.h deleted file mode 100644 index 66783cf41..000000000 --- a/libs/tflite/include/tflite/ext/kernels/TensorFlowSum.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __NNFW_TFLITE_EXT_KERNELS_TENSORFLOW_SUM_H__ -#define __NNFW_TFLITE_EXT_KERNELS_TENSORFLOW_SUM_H__ - -#include "tensorflow/contrib/lite/context.h" - -namespace nnfw -{ -namespace tflite -{ -namespace custom -{ -namespace TensorFlowSum -{ - -void *InitTensorFlowSum(TfLiteContext *context, const char *buffer, size_t length); -void FreeTensorFlowSum(TfLiteContext *context, void *buffer); -TfLiteStatus PrepareTensorFlowSum(TfLiteContext *context, TfLiteNode *node); -TfLiteStatus EvalTensorFlowSum(TfLiteContext *context, TfLiteNode *node); - -} // namespace TensorFlowSum -} // namespace custom -} // namespace tflite -} // namespace nnfw - -#endif // __NNFW_TFLITE_EXT_KERNELS_TENSORFLOW_SUM_H__ diff --git a/libs/tflite/include/tflite/ext/kernels/register.h b/libs/tflite/include/tflite/ext/kernels/register.h deleted file mode 100644 index 124af7abc..000000000 --- a/libs/tflite/include/tflite/ext/kernels/register.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved - Copyright 2017 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -==============================================================================*/ - -// NOTE To minimize diff with upstream tensorflow, disable clang-format -// clang-format off - -// NOTE This header is derived from the following file (in TensorFlow) -// 'externals/tensorflow/tensorflow/contrib/lite/kernels/register.h' -#ifndef __NNFW_TFLITE_EXT_KERNELS_REGISTER_H__ -#define __NNFW_TFLITE_EXT_KERNELS_REGISTER_H__ - -#include <unordered_map> -#include "tensorflow/contrib/lite/context.h" -#include "tensorflow/contrib/lite/model.h" - -namespace nnfw { -namespace tflite { - -class BuiltinOpResolver : public ::tflite::MutableOpResolver { - public: - BuiltinOpResolver(); -}; - -} // namespace tflite -} // namespace nnfw - -#endif // __NNFW_TFLITE_EXT_KERNELS_REGISTER_H__ - -// clang-format on |