Skip to content

Commit 74cda1c

Browse files
andylytensorflower-gardener
authored andcommitted
Register TPUPartitionedOutput in TF MLIR ODS.
PiperOrigin-RevId: 348503783 Change-Id: Ib918eb5657e2eb530082355bc46d08d0c7f0e131
1 parent 6ee0229 commit 74cda1c

File tree

1 file changed

+24
-0
lines changed
  • tensorflow/compiler/mlir/tensorflow/ir

1 file changed

+24
-0
lines changed

tensorflow/compiler/mlir/tensorflow/ir/tf_ops.td

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2062,4 +2062,28 @@ An op that groups a list of partitioned inputs together. This op
20622062
TF_DerivedOperandSizeAttr N = TF_DerivedOperandSizeAttr<0>;
20632063
}
20642064

2065+
def TF_TPUPartitionedOutputOp : TF_Op<"TPUPartitionedOutput", [NoSideEffect]> {
2066+
let summary = [{
2067+
An op that demultiplexes a tensor to be sharded by XLA to a list of partitioned
2068+
}];
2069+
2070+
let description = [{
2071+
outputs outside the XLA computation.
2072+
}];
2073+
2074+
let arguments = (ins
2075+
TF_Tensor:$inputs,
2076+
2077+
DefaultValuedAttr<I64Attr, "0">:$partition_dim,
2078+
OptionalAttr<StrAttr>:$_XlaSharding
2079+
);
2080+
2081+
let results = (outs
2082+
Variadic<TF_Tensor>:$output
2083+
);
2084+
2085+
TF_DerivedOperandTypeAttr T = TF_DerivedOperandTypeAttr<0>;
2086+
TF_DerivedResultSizeAttr num_splits = TF_DerivedResultSizeAttr<0>;
2087+
}
2088+
20652089
#endif // TF_OPS

0 commit comments

Comments
 (0)