[Mlir-commits] [mlir] [mlir][tensor] Add a tensor.concat operation (PR #72779)

Nicolas Vasilache llvmlistbot at llvm.org
Mon Nov 20 04:50:29 PST 2023


================
@@ -121,6 +121,66 @@ def Tensor_CastOp : Tensor_Op<"cast", [
   let hasCanonicalizer = 1;
 }
 
+//===----------------------------------------------------------------------===//
+// ConcatOp
+//===----------------------------------------------------------------------===//
+
+def Tensor_ConcatOp : Tensor_Op<"concat",
+    [Pure,
+     DeclareOpInterfaceMethods<OpAsmOpInterface, ["getAsmResultNames"]>,
+     DeclareOpInterfaceMethods<ReifyRankedShapedTypeOpInterface>]> {
+  let summary = "tensor concatenation operation";
+  let description = [{
+    The "concat" operation constructs a tensor out of a variadic list of input
+    tensors, concatenated along a static dimension. All inputs and the result
----------------
nicolasvasilache wrote:

 I find `concatenated along a static dimension` a bit confusing as I expected it to not work with `?`.
How about `concatenated along a static dimension *number*` ?

https://github.com/llvm/llvm-project/pull/72779


More information about the Mlir-commits mailing list