chromium/third_party/tflite/src/tensorflow/lite/core/c/builtin_op_data.h

/* 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.
==============================================================================*/
/// WARNING: Users of TensorFlow Lite should not include this file directly,
/// but should instead include
/// "third_party/tensorflow/lite/c/builtin_op_data.h".
/// Only the TensorFlow Lite implementation itself should include this
/// file directly.
#ifndef TENSORFLOW_LITE_CORE_C_BUILTIN_OP_DATA_H_
#define TENSORFLOW_LITE_CORE_C_BUILTIN_OP_DATA_H_

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

#include "tensorflow/lite/core/c/common.h"

#ifdef __cplusplus
extern "C" {
#endif  // __cplusplus

// TfLiteReshapeParams can't have dynamic data so we fix the maximum possible
// number of dimensions.
#define TFLITE_RESHAPE_PARAMS_MAX_DIMENSION_COUNT
#define TFLITE_STABLEHLO_SCATTER_PARAMS_MAX_DIMENSION_COUNT
#define TFLITE_STABLEHLO_GATHER_PARAMS_MAX_DIMENSION_COUNT
#define TFLITE_STABLEHLO_REDUCE_WINDOW_PARAMS_MAX_DIMENSION_COUNT
#define TFLITE_STABLEHLO_PAD_PARAMS_MAX_DIMENSION_COUNT

// TODO(aselle): Consider using "if this then that" for testing.

// Useful placeholder to put in otherwise empty structs to avoid size warnings.
EmptyStructPlaceholder;

// IMPORTANT: All new members of structs must be added at the end to ensure
// backwards compatibility.

// Possible padding types (for convolutions)
TfLitePadding;

TfLiteMirrorPaddingMode;

// TODO(b/130259536): We should move this out of builtin_op_data.
TfLitePaddingValues;

TfLiteMirrorPaddingParams;

// Possible fused activation functions.
TfLiteFusedActivation;

TfLiteConvParams;

TfLiteConv3DParams;

TfLiteConv3DTransposeParams;

TfLitePoolParams;

TfLiteDepthwiseConvParams;

TfLiteSVDFParams;

TfLiteRNNParams;

TfLiteSequenceRNNParams;

TfLiteBidirectionalSequenceRNNParams;

TfLiteFullyConnectedWeightsFormat;

TfLiteFullyConnectedParams;

TfLiteLSHProjectionType;

TfLiteLSHProjectionParams;

TfLiteSoftmaxParams;

TfLiteConcatenationParams;

TfLiteAddParams;

TfLiteSpaceToBatchNDParams;

TfLiteBatchToSpaceNDParams;

TfLiteBatchMatMulParams;

TfLiteMulParams;

TfLiteSubParams;

TfLiteDivParams;

TfLiteL2NormParams;

TfLiteLocalResponseNormParams;

TfLiteLSTMKernelType;

TfLiteLSTMParams;

TfLiteUnidirectionalSequenceLSTMParams;

TfLiteBidirectionalSequenceLSTMParams;

TfLiteResizeBilinearParams;

TfLiteResizeNearestNeighborParams;

TfLitePadParams;

TfLitePadV2Params;

TfLiteReshapeParams;

TfLiteSkipGramParams;

TfLiteSpaceToDepthParams;

TfLiteDepthToSpaceParams;

TfLiteCastParams;

TfLiteCombinerType;

TfLiteEmbeddingLookupSparseParams;

TfLiteGatherParams;

TfLiteTransposeParams;

TfLiteReducerParams;

TfLiteSplitParams;

TfLiteSplitVParams;

TfLiteSqueezeParams;

TfLiteStridedSliceParams;

TfLiteArgMaxParams;

TfLiteArgMinParams;

TfLiteTransposeConvParams;

TfLiteSparseToDenseParams;

TfLiteShapeParams;

TfLiteRankParams;

TfLiteFakeQuantParams;

TfLitePackParams;

TfLiteOneHotParams;

TfLiteUnpackParams;

TfLiteLeakyReluParams;

TfLiteUniqueParams;

TfLiteReverseSequenceParams;

TfLiteMatrixDiagParams;

TfLiteMatrixSetDiagParams;

TfLiteIfParams;

TfLiteWhileParams;

TfLiteCumsumParams;

TfLiteCallOnceParams;

TfLiteHashtableParams;

TfLiteVarHandleParams;

TfLiteRandomParams;

TfLiteBucketizeParams;

TfLiteGeluParams;

TfLiteStablehloConcatenateParams;

TfLiteStablehloScatterParams;

TfLiteRngAlgorithm;

TfLiteStablehloRngBitGeneratorParams;

TfLiteStablehloGatherParams;

TfLiteStablehloReduceWindowParams;

enum TfLiteReduceWindowFunction {};

TfLiteReduceWindowParams;

TfLiteStablehloPadParams;

TfLiteStablehloCompositeParams;

#ifdef __cplusplus
}  // extern "C"
#endif  // __cplusplus

#endif  // TENSORFLOW_LITE_CORE_C_BUILTIN_OP_DATA_H_