Skip to content

Commit c16bc2e

Browse files
modify comment
1 parent 6befa70 commit c16bc2e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.td

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def SparseTensorEncodingAttr : SparseTensor_Attr<"SparseTensorEncoding",
167167
- **soa** : only applicable to singleton levels, fuses the singleton
168168
level in SoA (structure of arrays) scheme.
169169

170-
In addition to the map, the following two fields are optional:
170+
In addition to the map, the following four fields are optional:
171171

172172
- The required bitwidth for position storage (integral offsets
173173
into the sparse storage scheme). A narrow width reduces the memory
@@ -183,11 +183,11 @@ def SparseTensorEncodingAttr : SparseTensor_Attr<"SparseTensorEncoding",
183183
coordinate over all levels). The choices are `8`, `16`, `32`,
184184
`64`, or, the default, `0` to indicate a native bitwidth.
185185

186-
- The required explicit value for the sparse tensor. If explicitVal is set,
186+
- The explicit value for the sparse tensor. If explicitVal is set,
187187
then all the non-zero values in the tensor have the same explicit value.
188188
The default value Attribute() indicates that it is not set.
189189

190-
- The required implicit value for the sparse tensor. If implicitVal is set,
190+
- The implicit value for the sparse tensor. If implicitVal is set,
191191
then the "zero" value in the tensor is equal to the implicit value.
192192
For now, we only support `0` as the implicit value but it could be
193193
extended in the future. The default value Attribute() indicates that

mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorType.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,10 +343,10 @@ class SparseTensorType {
343343
/// Returns the position-overhead bitwidth, defaulting to zero.
344344
unsigned getPosWidth() const { return enc ? enc.getPosWidth() : 0; }
345345

346-
/// Returns the explicit value, defaulting to empty Attribute.
346+
/// Returns the explicit value, defaulting to null Attribute for unset.
347347
Attribute getExplicitVal() const { return enc.getExplicitVal(); }
348348

349-
/// Returns the implicit value, defaulting to empty Attribute.
349+
/// Returns the implicit value, defaulting to null Attribute for 0.
350350
Attribute getImplicitVal() const { return enc.getImplicitVal(); }
351351

352352
/// Returns the coordinate-overhead MLIR type, defaulting to `IndexType`.

0 commit comments

Comments
 (0)