llvm-project/mlir/lib/IR
Aart Bik 7714b405a0 [mlir] introduce "encoding" attribute to tensor type
This CL introduces a generic attribute (called "encoding") on tensors.
The attribute currently does not carry any concrete information, but the type
system already correctly determines that tensor<8xi1,123> != tensor<8xi1,321>.
The attribute will be given meaning through an interface in subsequent CLs.

See ongoing discussion on discourse:

[RFC] Introduce a sparse tensor type to core MLIR
https://llvm.discourse.group/t/rfc-introduce-a-sparse-tensor-type-to-core-mlir/2944

A sparse tensor will look something like this:

```
// named alias with all properties we hold dear:
#CSR = {
  // individual named attributes
}

// actual sparse tensor type:
tensor<?x?xf64, #CSR>
```

I see the following rough 5 step plan going forward:

(1) introduce this format attribute in this CL, currently still empty
(2) introduce attribute interface that gives it "meaning", focused on sparse in first phase
(3) rewrite sparse compiler to use new type, remove linalg interface and "glue"
(4) teach passes to deal with new attribute, by rejecting/asserting on non-empty attribute as simplest solution, or doing meaningful rewrite in the longer run
(5) add FE support, document, test, publicize new features, extend "format" meaning to other domains if useful

Reviewed By: stellaraccident, bondhugula

Differential Revision: https://reviews.llvm.org/D99548
2021-04-12 10:37:15 -07:00
..
AffineExpr.cpp s[mlir] Tighten computation of inferred SubView result type. 2021-02-11 22:38:16 +00:00
AffineExprDetail.h [mlir] Remove the use of "kinds" from Attributes and Types 2020-08-18 16:20:14 -07:00
AffineMap.cpp [mlir][Python][Linalg] Add missing attributes to linalg ops 2021-04-01 08:16:50 +00:00
AffineMapDetail.h Mass update the MLIR license header to mention "Part of the LLVM project" 2020-01-26 03:58:30 +00:00
AsmPrinter.cpp [mlir] introduce "encoding" attribute to tensor type 2021-04-12 10:37:15 -07:00
AttributeDetail.h [mlir][IR] Move the remaining builtin attributes to ODS. 2021-03-16 16:31:53 -07:00
Attributes.cpp [mlir] Remove the MutableDictionaryAttr class 2020-12-17 17:18:42 -08:00
Block.cpp Remove unused function, fix warning (NFC) 2021-03-25 18:37:57 +00:00
Builders.cpp [mlir] Simplify various pieces of code now that Identifier has access to the Context/Dialect 2021-02-26 18:00:05 -08:00
BuiltinAttributes.cpp [mlir] add support for index type in vectors. 2021-04-08 08:17:13 +00:00
BuiltinDialect.cpp Define a `NoTerminator` traits that allows operations with a single block region to not provide a terminator 2021-03-25 03:59:03 +00:00
BuiltinTypes.cpp [mlir] introduce "encoding" attribute to tensor type 2021-04-12 10:37:15 -07:00
CMakeLists.txt [mlir] support data layout specs on ModuleOp 2021-03-24 15:13:38 +01:00
Diagnostics.cpp [mlir][Attribute] Remove usages of Attribute::getKind 2020-08-07 13:43:25 -07:00
Dialect.cpp Add a mechanism for Dialects to customize printing/parsing operations when they are unregistered 2021-03-23 00:40:03 +00:00
Dominance.cpp [mlir] Fix post-dominance between blocks of different regions. 2020-11-11 11:20:53 -08:00
FunctionImplementation.cpp [MLIR] Disallow `sym_visibility`, `sym_name` and `type` attributes in the parsed attribute dictionary. 2021-01-12 09:11:02 -08:00
FunctionSupport.cpp [mlir] Support FuncOpSignatureConversion for more FunctionLike ops. 2021-01-21 18:35:09 -07:00
IntegerSet.cpp [MLIR][NFC] drop some unnecessary includes 2020-03-27 09:17:27 +05:30
IntegerSetDetail.h Mass update the MLIR license header to mention "Part of the LLVM project" 2020-01-26 03:58:30 +00:00
Location.cpp [mlir][StorageUniquer] Properly call the destructor on non-trivially destructible storage instances 2021-03-11 11:35:32 -08:00
MLIRContext.cpp [mlir][IR] Move the remaining builtin attributes to ODS. 2021-03-16 16:31:53 -07:00
Operation.cpp Fix deletion of operations through the rewriter in a pattern matching a consumer operation 2021-03-30 22:02:14 +00:00
OperationSupport.cpp Add workaround for false positive in -Wfree-nonheap-object 2021-04-03 14:03:43 -07:00
PatternMatch.cpp [mlir][Pattern] Add better support for using interfaces/traits to match root operations in rewrite patterns 2021-03-23 14:05:33 -07:00
Region.cpp [NFC] Add getArgumentTypes() to Region 2020-07-28 18:27:42 -07:00
RegionKindInterface.cpp [MLIR] Add RegionKindInterface 2020-07-15 14:27:05 -07:00
SymbolTable.cpp Define a `NoTerminator` traits that allows operations with a single block region to not provide a terminator 2021-03-25 03:59:03 +00:00
TypeDetail.h [mlir] Compare elements directly rather than creating pair first 2021-03-24 14:39:11 -07:00
TypeRange.cpp [mlir][IR] Refactor the internal implementation of Value 2021-03-03 14:33:37 -08:00
TypeUtilities.cpp [mlir] Correct verifyCompatibleShapes 2021-03-11 13:04:10 +01:00
Types.cpp [mlir] Add better support for f80 and f128 2021-01-15 10:29:48 -05:00
Value.cpp [mlir][IR] Refactor the internal implementation of Value 2021-03-03 14:33:37 -08:00
Verifier.cpp Define a `NoTerminator` traits that allows operations with a single block region to not provide a terminator 2021-03-25 03:59:03 +00:00
Visitors.cpp [mlir] Add 'Skip' result to Operation visitor 2021-03-06 00:02:20 +02:00