| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[mlir][CF] Add structural type conversion patterns (#165629) Add structural type conversion patterns for CF dialect ops. These patterns are similar to the SCF structural type conversion patterns. This commit adds missing functionality and is in preparation of #165180, which changes the way blocks are converted. (Only entry blocks are converted.) | 8 个月前 | |
[mlir][bufferization] Test tensor encoding -> memref layout conversion (#161166) Support custom types (4/N): test that it is possible to customize memref layout specification for custom operations and function boundaries. This is purely a test setup (no API modifications) to ensure users are able to pass information from tensors to memrefs within bufferization process. To achieve this, a test pass is required (since bufferization options have to be set manually). As there is already a --test-one-shot-module-bufferize pass present, it is extended for the purpose. | 9 个月前 | |
[mlir][bufferization] Test tensor encoding -> memref layout conversion (#161166) Support custom types (4/N): test that it is possible to customize memref layout specification for custom operations and function boundaries. This is purely a test setup (no API modifications) to ensure users are able to pass information from tensors to memrefs within bufferization process. To achieve this, a test pass is required (since bufferization options have to be set manually). As there is already a --test-one-shot-module-bufferize pass present, it is extended for the purpose. | 9 个月前 | |
[mlir][bufferization] Test tensor encoding -> memref layout conversion (#161166) Support custom types (4/N): test that it is possible to customize memref layout specification for custom operations and function boundaries. This is purely a test setup (no API modifications) to ensure users are able to pass information from tensors to memrefs within bufferization process. To achieve this, a test pass is required (since bufferization options have to be set manually). As there is already a --test-one-shot-module-bufferize pass present, it is extended for the purpose. | 9 个月前 | |
[mlir] Remove duplicate includes (NFC) (#167187) Identified with readability-duplicate-include. | 8 个月前 | |
[mlir][bufferization] Test tensor encoding -> memref layout conversion (#161166) Support custom types (4/N): test that it is possible to customize memref layout specification for custom operations and function boundaries. This is purely a test setup (no API modifications) to ensure users are able to pass information from tensors to memrefs within bufferization process. To achieve this, a test pass is required (since bufferization options have to be set manually). As there is already a --test-one-shot-module-bufferize pass present, it is extended for the purpose. | 9 个月前 | |
[mlir][bufferization] Test tensor encoding -> memref layout conversion (#161166) Support custom types (4/N): test that it is possible to customize memref layout specification for custom operations and function boundaries. This is purely a test setup (no API modifications) to ensure users are able to pass information from tensors to memrefs within bufferization process. To achieve this, a test pass is required (since bufferization options have to be set manually). As there is already a --test-one-shot-module-bufferize pass present, it is extended for the purpose. | 9 个月前 | |
[mlir][NFC] update mlir/Dialect create APIs (28/n) (#150641) See https://github.com/llvm/llvm-project/pull/147168 for more info. | 1 年前 | |
[mlir][IR] Fix enum attribute handling by using parseKeywordOrString instead of parseKeyword (#156662) Change enum attribute parsing to handle special characters and multi-word identifiers. This allows enum attrs to use symbols like "+" and strings with separators like "dash-separated-sentence" instead of being limited to valid identifiers. This also aligns enum attribute parsing with how enums are already handled by the FieldParser: https://github.com/llvm/llvm-project/blob/main/mlir/tools/mlir-tblgen/EnumsGen.cpp#L108 Signed-off-by: Fabian Mora <fabian.mora-cordero@amd.com> | 10 个月前 | |
[mlir][tblgen] Fix region and successor references in custom directives (#146242) Previously, references to regions and successors were incorrectly disallowed outside the top-level assembly form. This change enables the use of bound regions and successors as variables in custom directives. | 1 年前 | |
[mlir][tblgen] Fix region and successor references in custom directives (#146242) Previously, references to regions and successors were incorrectly disallowed outside the top-level assembly form. This change enables the use of bound regions and successors as variables in custom directives. | 1 年前 | |
[mlir][NFC] update mlir/Dialect create APIs (28/n) (#150641) See https://github.com/llvm/llvm-project/pull/147168 for more info. | 1 年前 | |
[mlir][test] Reorganize the test dialect (#89424) This PR massively reorganizes the Test dialect's source files. It moves manually-written op hooks into TestOpDefs.cpp, moves format custom directive parsers and printers into TestFormatUtils, adds missing comment blocks, and moves around where generated source files are included for types, attributes, enums, etc. into their own source file. This will hopefully help navigate the test dialect source code, but also speeds up compile time of the test dialect by putting generated source files into separate compilation units. This also sets up the test dialect to shard its op definitions, done in the next PR. | 2 年前 | |
[mlir][test] Reorganize the test dialect (#89424) This PR massively reorganizes the Test dialect's source files. It moves manually-written op hooks into TestOpDefs.cpp, moves format custom directive parsers and printers into TestFormatUtils, adds missing comment blocks, and moves around where generated source files are included for types, attributes, enums, etc. into their own source file. This will hopefully help navigate the test dialect source code, but also speeds up compile time of the test dialect by putting generated source files into separate compilation units. This also sets up the test dialect to shard its op definitions, done in the next PR. | 2 年前 | |
[MLIR][ODS] Add support for overloading interface methods (#161828) This allows to define multiple interface methods with the same name but different arguments. | 9 个月前 | |
[mlir][Interfaces] Add interface methods to allow reifying single result/single dim of result. (#162924) Current implementation of reifyResultShapes forces all implementations to return all dimensions of all results. This can be wasteful when you only require dimensions of one result, or a single dimension of a result. Further this also creates issues with using patterns to resolve the tensor.dim and memref.dim operations since the extra operations created result in the pattern rewriter entering an infinite loop (eventually breaking out of the loop due to the iteration limit on the pattern rewriter). This is demonstrated by some of the test cases added here that hit this limit when using --resolve-shaped-type-result-dims and --resolve-ranked-shaped-type-result-dims. To resolve this issue the interface should allow for creating just the operations needed. This change is the first step in resolving this. The original implementation was done with the restriction in mind that it might not always be possible to compute dimension of a single result or one dimension of a single result in all cases. To account for such cases, two additional interface methods are added - reifyShapeOfResult (which allows reifying dimensions of just one result), has a default implementation that calls reifyResultShapes and returns the dimensions of a single result. - reifyDimOfResult (which allows reifying a single dimension of a single result) has a default implementation that calls reifyDimOfResult and returns the value for the dimension of the result (which in turn for the default case would call reifyDimOfResult). While this change sets up the interface, ideally most operations will implement the refiyDimOfResult when possible. For almost all operations in tree this is true. Subsequent commits will change those incrementally. Some of the tests added here that check that the default implementations for the above method work as expected, also end up hitting the pattern rewriter limit when using --resolve-ranked-shaped-type-result-dims/ --resolve-ranked-shaped-type-result-dims. For testing purposes, a flag is added to these passes that ignore the error returned by the pattern application (this flag is left on by default to maintain current state). Changes required downstream to integrate this change 1. In operation definitions in .td files, for those operations that implement the ReifyRankedShapedTypeOpInterface. def <op-name> : Op<..., [..., DeclareOpInterfaceMethods[ReifyRankedShapedTypeOpInterface]]> should be changed to def <op-name> : Op<..., [..., DeclareOpInterfaceMethods[ReifyRankedShapedTypeOpInterface, [ "reifyResultShapes"]]]> --------- Signed-off-by: MaheshRavishankar <mahesh.ravishankar@gmail.com> | 8 个月前 | |
[mlir][test] Shard the Test Dialect (NFC) (#89628) This PR uses the new op sharding mechanism in tablegen to shard the test dialect's op definitions. This breaks the definition of ops into multiple source files, speeding up compile time of the test dialect dramatically. This improves developer cycle times when iterating on the test dialect. | 2 年前 | |
[mlir][Interfaces] Add interface methods to allow reifying single result/single dim of result. (#162924) Current implementation of reifyResultShapes forces all implementations to return all dimensions of all results. This can be wasteful when you only require dimensions of one result, or a single dimension of a result. Further this also creates issues with using patterns to resolve the tensor.dim and memref.dim operations since the extra operations created result in the pattern rewriter entering an infinite loop (eventually breaking out of the loop due to the iteration limit on the pattern rewriter). This is demonstrated by some of the test cases added here that hit this limit when using --resolve-shaped-type-result-dims and --resolve-ranked-shaped-type-result-dims. To resolve this issue the interface should allow for creating just the operations needed. This change is the first step in resolving this. The original implementation was done with the restriction in mind that it might not always be possible to compute dimension of a single result or one dimension of a single result in all cases. To account for such cases, two additional interface methods are added - reifyShapeOfResult (which allows reifying dimensions of just one result), has a default implementation that calls reifyResultShapes and returns the dimensions of a single result. - reifyDimOfResult (which allows reifying a single dimension of a single result) has a default implementation that calls reifyDimOfResult and returns the value for the dimension of the result (which in turn for the default case would call reifyDimOfResult). While this change sets up the interface, ideally most operations will implement the refiyDimOfResult when possible. For almost all operations in tree this is true. Subsequent commits will change those incrementally. Some of the tests added here that check that the default implementations for the above method work as expected, also end up hitting the pattern rewriter limit when using --resolve-ranked-shaped-type-result-dims/ --resolve-ranked-shaped-type-result-dims. For testing purposes, a flag is added to these passes that ignore the error returned by the pattern application (this flag is left on by default to maintain current state). Changes required downstream to integrate this change 1. In operation definitions in .td files, for those operations that implement the ReifyRankedShapedTypeOpInterface. def <op-name> : Op<..., [..., DeclareOpInterfaceMethods[ReifyRankedShapedTypeOpInterface]]> should be changed to def <op-name> : Op<..., [..., DeclareOpInterfaceMethods[ReifyRankedShapedTypeOpInterface, [ "reifyResultShapes"]]]> --------- Signed-off-by: MaheshRavishankar <mahesh.ravishankar@gmail.com> | 8 个月前 | |
[MLIR] Add verification that symbol operations must not have results (#168390) This patch adds verification to the SymbolOpInterface to enforce the design constraint that symbol operations must not produce SSA results, as documented in [Symbols and SymbolTables](https://mlir.llvm.org/docs/SymbolsAndSymbolTables/#defining-or-declaring-a-symbol). This is a follow-up of #168376 | 8 个月前 | |
[mlir][NFC] update mlir/Dialect create APIs (28/n) (#150641) See https://github.com/llvm/llvm-project/pull/147168 for more info. | 1 年前 | |
[mlir] somewhat decompose TestDialect.cpp TestDialect.cpp along with the ODS-generated files amounts to around 100k LoC and takes a significant amount of time to compile. Factor out the test ops related to testing the sytnax and assembly format, which are a relatively large and well delimited group, into a separate set of files. Also factor out dialect interfaces into a separate file. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D155947 | 2 年前 | |
[mlir] make parseCustomOperationName() API check token type (#136306) Previously, this parser API call would accept any token and interpret its spelling as operation name, including tokens that are are not valid operation names. Make it accept only bare identifiers and keywords. The latter is questionable but consistent with current practices upstream. Fixes #132889. | 1 年前 | |
[mlir] Dialect Conversion: Add support for post-order legalization order (#166292) By default, the dialect conversion driver processes operations in pre-order: the initial worklist is populated pre-order. (New/modified operations are immediately legalized recursively.) This commit adds a new API for selective post-order legalization. Patterns can request an operation / region legalization via ConversionPatternRewriter::legalize. They can call these helper functions on nested regions before rewriting the operation itself. Note: In rollback mode, a failed recursive legalization typically leads to a conversion failure. Since recursive legalization is performed by separate pattern applications, there is no way for the original pattern to recover from such a failure. | 8 个月前 | |
[mlir][NFC] update mlir/Dialect create APIs (28/n) (#150641) See https://github.com/llvm/llvm-project/pull/147168 for more info. | 1 年前 | |
[mlir] Enable decoupling two kinds of greedy behavior. (#104649) The greedy rewriter is used in many different flows and it has a lot of convenience (work list management, debugging actions, tracing, etc). But it combines two kinds of greedy behavior 1) how ops are matched, 2) folding wherever it can. These are independent forms of greedy and leads to inefficiency. E.g., cases where one need to create different phases in lowering and is required to applying patterns in specific order split across different passes. Using the driver one ends up needlessly retrying folding/having multiple rounds of folding attempts, where one final run would have sufficed. Of course folks can locally avoid this behavior by just building their own, but this is also a common requested feature that folks keep on working around locally in suboptimal ways. For downstream users, there should be no behavioral change. Updating from the deprecated should just be a find and replace (e.g., find ./ -type f -exec sed -i 's|applyPatternsAndFoldGreedily|applyPatternsGreedily|g' {} \; variety) as the API arguments hasn't changed between the two. | 1 年前 | |
[mlir] Allows to query traits from types and attributes Types and attributes now have a hasTrait function that allow users to check if a type defines a trait. Also, AbstractType and AbstractAttribute has now a hasTraitFn field to carry the implementation of the hasTrait function of the concrete type or attribute. This patch also adds the remaining functions to access type and attribute traits in TableGen. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D105202 | 4 年前 | |
[MLIR][ODS] Re-enable direct implementation of type interfaces with method bodies (#166335) Since commit 842622bf8bea782e9d9865ed78b0d8643f098122 adding support for overloading interface methods, a using directive is emitted for any interface method that does not require emission of a trait method, including for methods that define a method body. However, methods directly specifying a body (e.g., via the methodBody parameter of InterfaceMethod) are implemented directly in the interface class and are therefore not present in the associated trait. The generated using directive then referes to a non-existent method of the trait, resulting in an error upon compilation of the generated code. This patch changes DefGen::emitTraitMethods(), such that genTraitMethodUsingDecl() is not invoked for interface methods with a body anymore. | 8 个月前 | |
[mlir][bufferization] Refine tensor-buffer compatibility checks (#167705) Generally, to_tensor and to_buffer already perform sufficient verification. However, there are some unnecessarily strict constraints: * builtin tensor requires its buffer counterpart to always be memref * to_buffer on ranked tensor requires to always return memref These checks are assertions (i.e. preconditions), however, they actually prevent an apparently useful bufferization where builtin tensors could become custom buffers. Lift these assertions, maintaining the verification procedure unchanged, to allow builtin -> custom bufferizations at operation boundary level. | 8 个月前 | |
[mlir][bufferization] Add tensor-like and buffer-like interfaces (#134220) Current one-shot bufferization infrastructure operates on top of TensorType and BaseMemRefType. These are non-extensible base classes of the respective builtins: tensor and memref. Thus, the infrastructure is bound to work only with builtin tensor/memref types. At the same time, there are customization points that allow one to provide custom logic to control the bufferization behavior. This patch introduces new type interfaces: tensor-like and buffer-like that aim to supersede TensorType/BaseMemRefType within the bufferization dialect and allow custom tensors / memrefs to be used. Additionally, these new type interfaces are attached to the respective builtin types so that the switch is seamless. Note that this patch does very minimal initial work, it does NOT refactor bufferization infrastructure. See https://discourse.llvm.org/t/rfc-changing-base-types-for-tensors-and-memrefs-from-c-base-classes-to-type-interfaces/85509 | 1 年前 | |
[NFC][Py Reformat] Reformat python files in mlir subdir This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with black. If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run git checkout --ours <yourfile> and then reformat it with black. If you run into any problems, post to discourse about it and we will try to help. RFC Thread below: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Differential Revision: https://reviews.llvm.org/D150782 | 3 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 8 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 8 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 9 个月前 | ||
| 8 个月前 | ||
| 2 年前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 3 年前 |