[mlir][bufferization] fix typo in example code for bufferization.alloc_tensor
authorPeiming Liu <peiming@google.com>
Thu, 8 Sep 2022 16:39:17 +0000 (16:39 +0000)
committerPeiming Liu <peiming@google.com>
Thu, 8 Sep 2022 17:07:45 +0000 (17:07 +0000)
See BufferizationOps.cpp:408, the dynamic sizes are enclosed by "()" not "[]"

https://github.com/llvm/llvm-project/blob/main/mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp#L408

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D133505

mlir/include/mlir/Dialect/Bufferization/IR/BufferizationOps.td

index 07e1f53..ae8421e 100644 (file)
@@ -60,7 +60,7 @@ def Bufferization_AllocTensorOp : Bufferization_Op<"alloc_tensor",
     Example:
 
     ```mlir
-    %c = bufferization.alloc_tensor [%d1, %d2] : tensor<?x?xf32, #SparseMatrix>
+    %c = bufferization.alloc_tensor(%d1, %d2) : tensor<?x?xf32, #SparseMatrix>
     %0 = linalg.matmul
       ins(%a, %b: tensor<?x?xf32, #SparseMatrix>, tensor<?x?xf32, #SparseMatrix>)
       outs(%c: tensor<?x?xf32, #SparseMatrix>) -> tensor<?x?xf32, #SparseMatrix>