From fc72453228db01806c262f7a0ce0450b22e56ea0 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Mon, 28 Sep 2020 01:08:53 -0700 Subject: [PATCH] Add Flex ops that are available in the global op registry already. PiperOrigin-RevId: 334103865 Change-Id: I17c70333cfa3de2c3f95ce5f54ba0423a56ffe85 --- .../delegates/flex/allowlisted_flex_ops.cc | 94 ------------------- 1 file changed, 94 deletions(-) diff --git a/tensorflow/lite/delegates/flex/allowlisted_flex_ops.cc b/tensorflow/lite/delegates/flex/allowlisted_flex_ops.cc index ccd22dacd5c..3728c8d24c5 100644 --- a/tensorflow/lite/delegates/flex/allowlisted_flex_ops.cc +++ b/tensorflow/lite/delegates/flex/allowlisted_flex_ops.cc @@ -68,10 +68,6 @@ const std::set& GetFlexAllowlist() { "AvgPoolGrad", "BatchMatMul", "BatchMatMulV2", - "BatchMatrixDiag", - "BatchMatrixDiagPart", - "BatchMatrixInverse", - "BatchMatrixSetDiag", "BatchNormWithGlobalNormalization", "BatchNormWithGlobalNormalizationGrad", "BatchToSpace", @@ -80,19 +76,7 @@ const std::set& GetFlexAllowlist() { "BiasAddGrad", "BiasAddV1", "Bincount", - "Bitcast", - "BitwiseAnd", - "BitwiseOr", - "BitwiseXor", "BoostedTreesBucketize", - "BoostedTreesCreateQuantileStreamResource", - "BoostedTreesFlushQuantileSummaries", - "BoostedTreesMakeQuantileSummaries", - "BoostedTreesQuantileStreamResourceAddSummaries", - "BoostedTreesQuantileStreamResourceDeserialize", - "BoostedTreesQuantileStreamResourceFlush", - "BoostedTreesQuantileStreamResourceGetBucketBoundaries", - "BoostedTreesQuantileStreamResourceHandleOp", "BroadcastArgs", "BroadcastGradientArgs", "BroadcastTo", @@ -102,7 +86,6 @@ const std::set& GetFlexAllowlist() { "Cast", "Ceil", "CheckNumerics", - "CheckNumericsV2", "CombinedNonMaxSuppression", "Complex", "ComplexAbs", @@ -117,9 +100,6 @@ const std::set& GetFlexAllowlist() { "Conv2DBackpropFilter", "Conv2DBackpropInput", "Conv3D", - "Conv3DBackpropFilter", - "Conv3DBackpropFilterV2", - "Conv3DBackpropInput", "Conv3DBackpropInputV2", "Cos", "Cosh", @@ -128,7 +108,6 @@ const std::set& GetFlexAllowlist() { "CropAndResizeGradImage", "Cumprod", "Cumsum", - "CumulativeLogsumexp", "DataFormatDimMap", "DataFormatVecPermute", "DebugGradientIdentity", @@ -150,10 +129,7 @@ const std::set& GetFlexAllowlist() { "Dequantize", "DestroyTemporaryVariable", "Diag", - "DiagPart", "Dilation2D", - "Dilation2DBackpropFilter", - "Dilation2DBackpropInput", "Div", "DivNoNan", "DynamicPartition", @@ -162,7 +138,6 @@ const std::set& GetFlexAllowlist() { "Elu", "EluGrad", "Empty", - "EmptyTensorList", "EncodeBase64", "EncodeJpeg", "EncodeJpegVariableQuality", @@ -208,7 +183,6 @@ const std::set& GetFlexAllowlist() { "GetSessionTensor", "Greater", "GreaterEqual", - "HistogramSummary", "IFFT", "IFFT2D", "IFFT3D", @@ -219,7 +193,6 @@ const std::set& GetFlexAllowlist() { "IdentityN", "Imag", "ImageProjectiveTransformV2", - "ImageProjectiveTransformV3", "ImmutableConst", "InTopK", "InTopKV2", @@ -228,16 +201,13 @@ const std::set& GetFlexAllowlist() { "InplaceUpdate", "Inv", "InvGrad", - "Invert", "InvertPermutation", - "IsBoostedTreesQuantileStreamResourceInitialized", "IsFinite", "IsNan", "IsVariableInitialized", "LRN", "LeakyRelu", "LeakyReluGrad", - "LeftShift", "Less", "LessEqual", "LinSpace", @@ -250,9 +220,6 @@ const std::set& GetFlexAllowlist() { "LoopCond", "MatMul", "MatrixDiag", - "MatrixDiagPart", - "MatrixDiagPartV2", - "MatrixDiagPartV3", "MatrixDiagV2", "MatrixDiagV3", "MatrixInverse", @@ -262,8 +229,6 @@ const std::set& GetFlexAllowlist() { "Max", "MaxPool", "MaxPool3D", - "MaxPool3DGrad", - "MaxPool3DGradGrad", "MaxPoolGrad", "MaxPoolGradGrad", "MaxPoolGradGradV2", @@ -274,7 +239,6 @@ const std::set& GetFlexAllowlist() { "Maximum", "Mean", "Merge", - "MergeSummary", "MergeV2Checkpoints", "Mfcc", "Min", @@ -291,7 +255,6 @@ const std::set& GetFlexAllowlist() { "NonMaxSuppressionV2", "NonMaxSuppressionV3", "NonMaxSuppressionV4", - "NonMaxSuppressionV5", "NonMaxSuppressionWithOverlaps", "NotEqual", "OneHot", @@ -301,18 +264,15 @@ const std::set& GetFlexAllowlist() { "PadV2", "PaddingFIFOQueue", "PaddingFIFOQueueV2", - "ParallelConcat", "ParallelDynamicStitch", "ParseExample", "ParseExampleV2", "ParseSequenceExample", - "ParseSequenceExampleV2", "ParseSingleExample", "ParseSingleSequenceExample", "Placeholder", "PlaceholderV2", "PlaceholderWithDefault", - "PopulationCount", "Pow", "PreventGradient", "Print", @@ -358,8 +318,6 @@ const std::set& GetFlexAllowlist() { "RaggedTensorToSparse", "RaggedTensorToTensor", "RandomGamma", - "RandomPoisson", - "RandomPoissonV2", "RandomStandardNormal", "RandomUniform", "RandomUniformInt", @@ -369,7 +327,6 @@ const std::set& GetFlexAllowlist() { "RealDiv", "Reciprocal", "ReciprocalGrad", - "Recv", "ReduceJoin", "RefEnter", "RefExit", @@ -397,31 +354,22 @@ const std::set& GetFlexAllowlist() { "ResourceApplyAdagradDA", "ResourceApplyAdagradV2", "ResourceApplyAdam", - "ResourceApplyAdamWithAmsgrad", "ResourceApplyAddSign", "ResourceApplyCenteredRMSProp", "ResourceApplyFtrl", "ResourceApplyFtrlV2", "ResourceApplyGradientDescent", - "ResourceApplyKerasMomentum", "ResourceApplyMomentum", "ResourceApplyPowerSign", "ResourceApplyProximalAdagrad", "ResourceApplyProximalGradientDescent", "ResourceApplyRMSProp", - "ResourceScatterNdAdd", - "ResourceScatterNdMax", - "ResourceScatterNdMin", - "ResourceScatterNdSub", - "ResourceScatterNdUpdate", "ResourceSparseApplyAdadelta", "ResourceSparseApplyAdagrad", "ResourceSparseApplyAdagradDA", - "ResourceSparseApplyAdagradV2", "ResourceSparseApplyCenteredRMSProp", "ResourceSparseApplyFtrl", "ResourceSparseApplyFtrlV2", - "ResourceSparseApplyKerasMomentum", "ResourceSparseApplyMomentum", "ResourceSparseApplyProximalAdagrad", "ResourceSparseApplyProximalGradientDescent", @@ -433,23 +381,14 @@ const std::set& GetFlexAllowlist() { "Reverse", "ReverseSequence", "ReverseV2", - "RightShift", "Round", "Rsqrt", "RsqrtGrad", - "SampleDistortedBoundingBox", "SampleDistortedBoundingBoxV2", "Save", "SaveSlices", "SaveV2", - "ScalarSummary", "ScatterNd", - "ScatterNdAdd", - "ScatterNdMax", - "ScatterNdMin", - "ScatterNdNonAliasingAdd", - "ScatterNdSub", - "ScatterNdUpdate", "SegmentMax", "SegmentMean", "SegmentMin", @@ -459,7 +398,6 @@ const std::set& GetFlexAllowlist() { "SelectV2", "Selu", "SeluGrad", - "Send", "Shape", "ShapeN", "ShardedFilename", @@ -483,7 +421,6 @@ const std::set& GetFlexAllowlist() { "SparseApplyAdadelta", "SparseApplyAdagrad", "SparseApplyAdagradDA", - "SparseApplyAdagradV2", "SparseApplyCenteredRMSProp", "SparseApplyFtrl", "SparseApplyFtrlV2", @@ -522,14 +459,12 @@ const std::set& GetFlexAllowlist() { "StackPush", "StackPushV2", "StackV2", - "StatelessMultinomial", "StatelessRandomGammaV2", "StatelessRandomNormal", "StatelessRandomPoisson", "StatelessRandomUniform", "StatelessRandomUniformFullInt", "StatelessRandomUniformInt", - "StatelessSampleDistortedBoundingBox", "StatelessTruncatedNormal", "StaticRegexReplace", "StopGradient", @@ -585,31 +520,11 @@ const std::set& GetFlexAllowlist() { "TensorArrayWrite", "TensorArrayWriteV2", "TensorArrayWriteV3", - "TensorListConcat", - "TensorListConcatLists", - "TensorListConcatV2", - "TensorListElementShape", - "TensorListFromTensor", - "TensorListGather", - "TensorListGetItem", - "TensorListLength", - "TensorListPopBack", - "TensorListPushBack", - "TensorListPushBackBatch", - "TensorListReserve", - "TensorListResize", - "TensorListScatter", - "TensorListScatterIntoExistingList", - "TensorListScatterV2", - "TensorListSetItem", - "TensorListSplit", - "TensorListStack", "TensorScatterAdd", "TensorScatterMax", "TensorScatterMin", "TensorScatterSub", "TensorScatterUpdate", - "TensorStridedSliceUpdate", "Tile", "TileGrad", "Timestamp", @@ -631,30 +546,21 @@ const std::set& GetFlexAllowlist() { "UnsortedSegmentMin", "UnsortedSegmentProd", "UnsortedSegmentSum", - "UnwrapDatasetVariant", "Variable", "VariableV2", "Where", - "WrapDatasetVariant", "Xdivy", - "Xlog1py", "Xlogy", "ZerosLike", "_Arg", "_ArrayToList", - "_DeviceArg", - "_DeviceRetval", - "_FusedConv2D", "_HostCast", "_HostRecv", "_HostSend", "_ListToArray", - "_ParallelConcatStart", - "_ParallelConcatUpdate", "_Recv", "_Retval", "_Send", - "_SwitchN", // go/keep-sorted end }); return *allowlisted_flex_ops;