forked from OSchip/llvm-project
[mlir][sparse] minor edit in doc, removed TAB from test
Reviewed By: Peiming Differential Revision: https://reviews.llvm.org/D134924
This commit is contained in:
parent
fe49ba84d3
commit
94e4928bd3
|
@ -49,21 +49,25 @@ def SparseTensorEncodingAttr : SparseTensor_Attr<"SparseTensorEncoding",
|
|||
In the future, we may introduce many more dimension level types and
|
||||
properties, and separate specifying the two completely rather than
|
||||
using this suffix mechanism.
|
||||
- Dimension ordering on the indices of this tensor type. Unlike dense
|
||||
storage, most sparse storage schemes do not provide fast random access.
|
||||
- An optional dimension ordering on the indices of this tensor type. Unlike
|
||||
dense storage, most sparse storage schemes do not provide fast random access.
|
||||
This affine map specifies the order of dimensions that should be supported
|
||||
by the sparse storage scheme. For example, for a 2-d tensor, "(i,j) -> (i,j)"
|
||||
requests row-wise storage and "(i,j) -> (j,i)" requests column-wise storage.
|
||||
By default, an identify mapping is used, which implies that the original
|
||||
indices directly correspond to stored indices (viz. "(i,j,...) -> (i,j,...)").
|
||||
- The required bit width for "pointer" storage (integral offsets into
|
||||
the sparse storage scheme). A narrow width reduces the memory footprint
|
||||
of overhead storage, as long as the width suffices to define the total
|
||||
required range (viz. the maximum number of stored entries over all indirection
|
||||
dimensions). The choices are `8`, `16`, `32`, `64`, or `0` for a native width.
|
||||
dimensions). The choices are `8`, `16`, `32`, `64`, or, the default, `0` to
|
||||
indicate the native bit width.
|
||||
- The required bit width for "index" storage (elements of the coordinates of
|
||||
stored entries). A narrow width reduces the memory footprint of overhead
|
||||
storage, as long as the width suffices to define the total required range
|
||||
(viz. the maximum value of each tensor index over all dimensions). The
|
||||
choices are `8`, `16`, `32`, `64`, or `0` for a native width.
|
||||
choices are `8`, `16`, `32`, `64`, or, the default, `0` to indicate the
|
||||
native bit width.
|
||||
|
||||
Examples:
|
||||
|
||||
|
|
|
@ -383,7 +383,7 @@ func.func @sparse_compression(%tensor: tensor<8x8xf64, #CSR>,
|
|||
%filled: memref<?xi1>,
|
||||
%added: memref<?xindex>,
|
||||
%count: index,
|
||||
%i: index) {
|
||||
%i: index) {
|
||||
sparse_tensor.compress %values, %filled, %added, %count into %tensor[%i]
|
||||
: memref<?xf64>, memref<?xi1>, memref<?xindex>, tensor<8x8xf64, #CSR>
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue