@@ -58,7 +58,7 @@ def SparseTensor_AssembleOp : SparseTensor_Op<"assemble", [Pure]>,
58
58
Arguments<(ins TensorOf<[AnyType]>:$values,
59
59
Variadic<TensorOf<[AnySignlessIntegerOrIndex]>>:$levels)>,
60
60
Results<(outs AnySparseTensor: $result)> {
61
- let summary = "Returns a sparse tensor from the given values, levels";
61
+ let summary = "Returns a sparse tensor assembled from the given values and levels";
62
62
63
63
let description = [{
64
64
Assembles the values and per-level coordinate or postion arrays into a sparse tensor.
@@ -71,7 +71,7 @@ def SparseTensor_AssembleOp : SparseTensor_Op<"assemble", [Pure]>,
71
71
each supplies the sparse tensor coordinates scheme in the sparse tensor for
72
72
the corresponding level as specifed by `sparse_tensor::StorageLayout`.
73
73
74
- This operation can be used to materialize a sparse tensor from external
74
+ This operation can be used to assemble a sparse tensor from external
75
75
sources; e.g., when passing two numpy arrays from Python.
76
76
77
77
Disclaimer: This is the user's responsibility to provide input that can be
@@ -82,7 +82,6 @@ def SparseTensor_AssembleOp : SparseTensor_Op<"assemble", [Pure]>,
82
82
dimOrdering/higherOrdering mappings. However, the current implementation
83
83
does not yet support them.
84
84
85
-
86
85
Example:
87
86
88
87
```mlir
@@ -109,16 +108,17 @@ def SparseTensor_DisassembleOp : SparseTensor_Op<"disassemble", [Pure, SameVaria
109
108
Variadic<TensorOf<[AnySignlessIntegerOrIndex]>>:$out_levels)>,
110
109
Results<(outs TensorOf<[AnyType]>:$ret_values,
111
110
Variadic<TensorOf<[AnySignlessIntegerOrIndex]>>:$ret_levels,
112
- ScalarLikeOf<[AnySignlessIntegerOrIndex]> :$val_len,
113
- Variadic<ScalarLikeOf<[AnySignlessIntegerOrIndex]> >:$lvl_lens)> {
114
- let summary = "Returns the (values, coordinates) pair unpacked from the input tensor";
111
+ AnyIndexingScalarLike :$val_len,
112
+ Variadic<AnyIndexingScalarLike >:$lvl_lens)> {
113
+ let summary = "Returns the (values, coordinates) pair disassembled from the input tensor";
115
114
116
115
let description = [{
117
- The disassemble operation is the inverse of `sparse_tensor::assemble`. It returns
118
- the values and per-level position and coordinate array to the user
119
- from the sparse tensor along with the actual length of the memory used in
120
- each returned buffer. This operation can be used for returning an
121
- unpacked MLIR sparse tensor to frontend; e.g., returning two numpy arrays to Python.
116
+ The disassemble operation is the inverse of `sparse_tensor::assemble`.
117
+ It returns the values and per-level position and coordinate array to the
118
+ user from the sparse tensor along with the actual length of the memory used
119
+ in each returned buffer. This operation can be used for returning an
120
+ disassembled MLIR sparse tensor to frontend; e.g., returning two numpy arrays
121
+ to Python.
122
122
123
123
Disclaimer: This is the user's responsibility to allocate large enough buffers
124
124
to hold the sparse tensor. The sparsifier simply copies each fields
0 commit comments