[Mlir-commits] [mlir] 7482cd6 - [mlir][sparse] updated our sparse dialect doc with some recent changes
Aart Bik
llvmlistbot at llvm.org
Tue Jun 7 14:28:05 PDT 2022
Author: Aart Bik
Date: 2022-06-07T14:27:57-07:00
New Revision: 7482cd6869317bce29366701a8baa3b0ef125566
URL: https://github.com/llvm/llvm-project/commit/7482cd6869317bce29366701a8baa3b0ef125566
DIFF: https://github.com/llvm/llvm-project/commit/7482cd6869317bce29366701a8baa3b0ef125566.diff
LOG: [mlir][sparse] updated our sparse dialect doc with some recent changes
The `init` and `tensor` ops are renamed (and one moved to another dialect).
Reviewed By: springerm
Differential Revision: https://reviews.llvm.org/D127169
Added:
Modified:
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td b/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
index bdc27b57fe10f..fc09a068fe285 100644
--- a/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
+++ b/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
@@ -180,9 +180,9 @@ def SparseTensor_LexInsertOp : SparseTensor_Op<"lex_insert", []>,
Inserts the given value at given indices into the underlying sparse
storage format of the given tensor with the given indices. This
operation can only be applied when a tensor materializes unintialized
- with an `init` operation, the insertions occur in strict lexicographical
- index order, and the final tensor is constructed with a `tensor`
- operation that has the `hasInserts` attribute set.
+ with a `bufferization.alloc_tensor` operation, the insertions occur in
+ strict lexicographical index order, and the final tensor is constructed
+ with a `load` operation that has the `hasInserts` attribute set.
Note that this operation is "impure" in the sense that its behavior
is solely defined by side-effects and not SSA values. The semantics
@@ -309,12 +309,12 @@ def SparseTensor_ReleaseOp : SparseTensor_Op<"release", []>,
string summary = "Releases underlying sparse storage format of given tensor";
string description = [{
Releases the underlying sparse storage format for a tensor that
- materialized earlier through a `new` operator, `init` operator, or a
- `convert` operator with an annotated tensor type as destination (unless
- that convert is folded away since the source and destination types were
- identical). This operation should only be called once for any materialized
- tensor. Also, after this operation, any subsequent `memref` querying
- operation on the tensor returns undefined results.
+ materialized earlier through a `new` operation, a `convert` operation
+ with annotated destination tensor type (unless the convert is folded
+ away), or a `bufferization.alloc_tensor` operation. The release operation
+ should only be called once for any materialized tensor. After this
+ operation, any subsequent `memref` querying operation on the tensor
+ returns undefined results.
Note that this operation is "impure" in the sense that its behavior
is solely defined by side-effects and not SSA values. The semantics
@@ -418,7 +418,7 @@ def SparseTensor_BinaryOp : SparseTensor_Op<"binary", [NoSideEffect]>,
%result = sparse_tensor.binary %a, %b : f64, f64 to f64
overlap={
^bb0(%x: f64, %y: f64):
- %cmp = arith.cmpi "uge", %column, %row : index
+ %cmp = arith.cmpi "uge", %col, %row : index
%upperTriangleResult = arith.addf %x, %y : f64
%lowerTriangleResult = arith.subf %x, %y : f64
%ret = arith.select %cmp, %upperTriangleResult, %lowerTriangleResult : f64
@@ -427,9 +427,9 @@ def SparseTensor_BinaryOp : SparseTensor_Op<"binary", [NoSideEffect]>,
left=identity
right={
^bb0(%y: f64):
- %cmp = arith.cmpi "uge", %column, %row : index
+ %cmp = arith.cmpi "uge", %col, %row : index
%lowerTriangleResult = arith.negf %y : f64
- %ret = arith.select %cmp, %y, %lowerTriangleResult
+ %ret = arith.select %cmp, %y, %lowerTriangleResult : f64
sparse_tensor.yield %ret : f64
}
linalg.yield %result : f64
More information about the Mlir-commits
mailing list