[Mlir-commits] [mlir] de883be - [mlir][bufferization] fix typo in example code for bufferization.alloc_tensor

Peiming Liu llvmlistbot at llvm.org
Thu Sep 8 10:07:54 PDT 2022


Author: Peiming Liu
Date: 2022-09-08T17:07:45Z
New Revision: de883be1f0807cf6a35c3e732dab42399670ab43

URL: https://github.com/llvm/llvm-project/commit/de883be1f0807cf6a35c3e732dab42399670ab43
DIFF: https://github.com/llvm/llvm-project/commit/de883be1f0807cf6a35c3e732dab42399670ab43.diff

LOG: [mlir][bufferization] fix typo in example code for bufferization.alloc_tensor

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/Bufferization/IR/BufferizationOps.td b/mlir/include/mlir/Dialect/Bufferization/IR/BufferizationOps.td
index 07e1f53ab6a79..ae8421e30c368 100644
--- a/mlir/include/mlir/Dialect/Bufferization/IR/BufferizationOps.td
+++ b/mlir/include/mlir/Dialect/Bufferization/IR/BufferizationOps.td
@@ -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>


        


More information about the Mlir-commits mailing list