diff --git a/tensorflow/compiler/mlir/tensorflow/ir/tf_generated_ops.td b/tensorflow/compiler/mlir/tensorflow/ir/tf_generated_ops.td index a8667427a45..b64750078c8 100644 --- a/tensorflow/compiler/mlir/tensorflow/ir/tf_generated_ops.td +++ b/tensorflow/compiler/mlir/tensorflow/ir/tf_generated_ops.td @@ -10841,11 +10841,27 @@ def TF_ZerosLikeOp : TF_Op<"ZerosLike", [NoSideEffect, SameOperandsAndResultType def TF__FusedConv2DOp : TF_Op<"_FusedConv2D", [NoSideEffect]> { let summary = [{ -*NOTE*: Do not invoke this operator directly in Python. Grappler is +Performs a convolution followed by a specified series of operations. }]; let description = [{ -expected to create these operators. +The inputs to the convolution are `input` and `filter`. The series of operations +that follows is specified by the `fused_ops` attribute, which is a list of TF op +names specified as strings (e.g. "Relu"). They are performed in order, where the +(first) input to each op is the output of the preceding op. The first input and +the output of each fused_op must be of type T. + +Currently supported fused_op combinations are: [X] and [X,A], where X is one of +{"BiasAdd","FusedBatchNorm"} and A is one of {"Elu","Relu","Relu6"}. + +* The first input to op X is the Conv2D result, and the additional input(s) to X +are specified by `args`. +* If there is an op A specified, the output of op X is the input to op A, and op +A produces the _FusedConv2D output. Otherwise, op X produces the _FusedConv2D +output. + +*NOTE*: Do not invoke this operator directly in Python. Grappler is expected to +create these operators. }]; let arguments = (ins diff --git a/tensorflow/core/ops/nn_ops.cc b/tensorflow/core/ops/nn_ops.cc index 518972696f1..7eedd8b0371 100644 --- a/tensorflow/core/ops/nn_ops.cc +++ b/tensorflow/core/ops/nn_ops.cc @@ -405,8 +405,25 @@ REGISTER_OP("_FusedConv2D") // ---------------------------------------------------------------------- // .SetShapeFn(shape_inference::Conv2DShapeWithExplicitPadding) .Doc(R"doc( -*NOTE*: Do not invoke this operator directly in Python. Grappler is -expected to create these operators. +Performs a convolution followed by a specified series of operations. + +The inputs to the convolution are `input` and `filter`. The series of operations +that follows is specified by the `fused_ops` attribute, which is a list of TF op +names specified as strings (e.g. "Relu"). They are performed in order, where the +(first) input to each op is the output of the preceding op. The first input and +the output of each fused_op must be of type T. + +Currently supported fused_op combinations are: [X] and [X,A], where X is one of +{"BiasAdd","FusedBatchNorm"} and A is one of {"Elu","Relu","Relu6"}. + +* The first input to op X is the Conv2D result, and the additional input(s) to X +are specified by `args`. +* If there is an op A specified, the output of op X is the input to op A, and op +A produces the _FusedConv2D output. Otherwise, op X produces the _FusedConv2D +output. + +*NOTE*: Do not invoke this operator directly in Python. Grappler is expected to +create these operators. )doc"); namespace {