message: [MLIR:TF/XLA] Add missing stack/tensor-list ops to the TF dialect
diff: @@ -6418,6 +6418,74 @@ shape(squeeze(t, [2, 4])) ==> [1, 2, 3, 1]
  TF_DerivedOperandTypeAttr T = TF_DerivedOperandTypeAttr<0>;
  }
  +def TF_StackCloseV2Op : TF_Op<"StackCloseV2", []> {
  + let summary = "Delete the stack from its resource container.";
  +
  + let description = [{
  + }];
  +
  + let arguments = (ins
  + TF_ResourceTensor:$handle
  + );
  +
  + let results = (outs);
  +}
  +
  +def TF_StackPopV2Op : TF_Op<"StackPopV2", []> {
  + let summary = "Pop the element at the top of the stack.";
  +
  + let description = [{
  + }];
  +
  + let arguments = (ins
  + TF_ResourceTensor:$handle
  + );
  +
  + let results = (outs
  + TF_Tensor:$elem
  + );
  +
  + TF_DerivedResultTypeAttr elem_type = TF_DerivedResultTypeAttr<0>;
  +}
  +
  +def TF_StackPushV2Op : TF_Op<"StackPushV2", []> {
  + let summary = "Push an element onto the stack.";
  +
  + let description = [{
  + }];
  +
  + let arguments = (ins
  + TF_ResourceTensor:$handle,
  + TF_Tensor:$elem,
  +
  + DefaultValuedAttr<BoolAttr, "false">:$swap_memory
  + );
  +
  + let results = (outs
  + TF_Tensor:$output
  + );
  +
  + TF_DerivedOperandTypeAttr T = TF_DerivedOperandTypeAttr<1>;
  +}
  +
  +def TF_StackV2Op : TF_Op<"StackV2", []> {
  + let summary = "A stack that produces elements in first-in last-out order.";
  +
  + let description = [{
  + }];
  +
  + let arguments = (ins
  + I32Tensor:$max_size,
  +
  + TypeAttr:$elem_type,
  + StrAttr:$stack_name
  + );
  +
  + let results = (outs
  + TF_ResourceTensor:$handle
  + );
  +}
  +
  def TF_StopGradientOp : TF_Op<"StopGradient", [NoSideEffect, SameOperandsAndResultType]> {
  let summary = "Stops gradient computation.";
  @@ -6980,6 +7048,33 @@ length: the number of tensors in the list
  );
  }
  +def TF_TensorListPopBackOp : TF_Op<"TensorListPopBack", [NoSideEffect]> {
  + let summary = [{
  +Returns the last element of the input list as well as a list with all but that element.
  + }];
  +
  + let description = [{
  +Fails if the list is empty.
  +
  +input_handle: the input list
  +tensor: the withdrawn last element of the list
  +element_dtype: the type of elements in the list
  +element_shape: the shape of the output tensor
  + }];
  +
  + let arguments = (ins
  + TF_VariantTensor:$input_handle,
  + I32Tensor:$element_shape
  + );
  +
  + let results = (outs
  + TF_VariantTensor:$output_handle,
  + TF_Tensor:$tensor
  + );
  +
  + TF_DerivedResultTypeAttr element_dtype = TF_DerivedResultTypeAttr<1>;
  +}
  +
  def TF_TensorListPushBackOp : TF_Op<"TensorListPushBack", [NoSideEffect]> {
  let summary = [{
  Returns a list which has the passed-in `Tensor` as last element and the other elements of the given list in `input_handle`.
  