[Mlir-commits] [mlir] bf7dbc2 - [mlir][sparse][bufferization] fix doc on new init operation
Aart Bik
llvmlistbot at llvm.org
Thu Jun 2 12:04:47 PDT 2022
Author: Aart Bik
Date: 2022-06-02T12:04:36-07:00
New Revision: bf7dbc2a30e8f71fde39cef2126baacd05f24b40
URL: https://github.com/llvm/llvm-project/commit/bf7dbc2a30e8f71fde39cef2126baacd05f24b40
DIFF: https://github.com/llvm/llvm-project/commit/bf7dbc2a30e8f71fde39cef2126baacd05f24b40.diff
LOG: [mlir][sparse][bufferization] fix doc on new init operation
The example was still using the -now- removed sparse_tensor.init_tensor.
Also, I made the input operands of the matrix multiplication sparse too
(since it looks a bit strange to multiply two dense matrices into a sparse).
Reviewed By: bixia
Differential Revision: https://reviews.llvm.org/D126897
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 a86a44e0411f3..f0904932b539a 100644
--- a/mlir/include/mlir/Dialect/Bufferization/IR/BufferizationOps.td
+++ b/mlir/include/mlir/Dialect/Bufferization/IR/BufferizationOps.td
@@ -48,9 +48,9 @@ def Bufferization_AllocTensorOp : Bufferization_Op<"alloc_tensor",
another op. E.g.:
```mlir
- %c = sparse_tensor.init_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>, tensor<?x?xf32>)
+ 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