The new "encoding" field in tensor types so far had no meaning. This revision introduces:
- an encoding attribute interface in IR: for verification between tensors and encodings in general
- an attribute in Tensor dialect; #tensor.sparse<dict> + concrete sparse tensors API
Active discussion:
https://llvm.discourse.group/t/rfc-introduce-a-sparse-tensor-type-to-core-mlir/2944/
It isn't clear to me that we need a dictionary here.
Why can't we explicitly list the members instead?
The whole implementation is pretty noisy and there are too many unnecessary indirection because of this dictionary. This is akin implementing a regular C struct with some sort of map<string, value> instead.