| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[MLIR][Parser] Fix AffineParser colliding bare identifiers with primitive types The parser currently can't parse bare identifiers like 'i0' in affine maps and sets, and similarly ids like f16/f32. But these bare ids are part of the grammar - although they are primitive types. error: expected bare identifier set = affine_set<(i0, i1) : ()> ^ This patch allows the parser for AffineMap/IntegerSet to parse bare identifiers as defined by the grammer. Reviewed By: bondhugula, rriddle Differential Revision: https://reviews.llvm.org/D127076 | 3 年前 | |
[MLIR][Affine] Allow <= in IntegerSet constraints This patch extends the affine parser to allow affine constraints with <=. This is useful in writing unittests for Presburger library and test in general. The internal storage and printing of IntegerSet is still in the original format. Reviewed By: bondhugula Differential Revision: https://reviews.llvm.org/D129046 | 3 年前 | |
[mlir] Remove special case parsing/printing of func operations This was leftover from when the standard dialect was destroyed, and when FuncOp moved to the func dialect. Now that these transitions have settled a bit we can drop these. Most updates were handled using a simple regex: replace ^( *)func with $1func.func Differential Revision: https://reviews.llvm.org/D124146 | 4 年前 | |
[mlir] Allow empty lists for DenseArrayAttr. Differential Revision: https://reviews.llvm.org/D129552 | 3 年前 | |
Add custom lilith script. Add custom lilith script with paths set to MLIR tools directories to simplify lit test. PiperOrigin-RevId: 209486232 | 7 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir] Convert raw data in dense element attributes for big-endian machines. This patch fixes a bug [[ https://bugs.llvm.org/show_bug.cgi?id=46091 | 46091 ]] Raw data for the dense-element attribute is written in little endian (LE) format. This commit converts the format to big endian (BE) in ʻAttribute Parser` on the BE machine. Also, when outputting on a BE machine, the BE format is converted to LE in "AsmPrinter". Differential Revision: https://reviews.llvm.org/D80695 | 5 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir] Add support for regex within expected-* diagnostics This can be enabled by using a -re suffix when defining the expected line, e.g. expected-error-re. This support is similar to what clang provides in its "expected" diagnostic framework(e.g. the -re is also the same). The regex definitions themselves are similar to FileCheck in that regex blocks are specified within {{ }} blocks. Differential Revision: https://reviews.llvm.org/D129343 | 3 年前 | |
[mlir:ODS] Support using attributes in AllTypesMatch to automatically add InferTypeOpInterface This allows for using attribute types in result type inference for use with InferTypeOpInterface. This was a TODO before, but it isn't much additional work to properly support this. After this commit, arith::ConstantOp can now have its InferTypeOpInterface implementation automatically generated. Differential Revision: https://reviews.llvm.org/D124580 | 4 年前 | |
[FileCheck] Catch missspelled directives. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D125604 | 4 年前 | |
[mlir] XFAIL IR/elements-attr-interface.mlir on SystemZ This is still failing as endianness of binary blob external resources is still not handled correctly. | 3 年前 | |
[mlir:Parser] Don't use strings for the "ugly" form of Attribute/Type syntax This commit refactors the syntax of "ugly" attribute/type formats to not use strings for wrapping. This means that moving forward attirbutes and type formats will always need to be in some recognizable form, i.e. if they use incompatible characters they will need to manually wrap those in a string, the framework will no longer do it automatically. This has the benefit of greatly simplifying how parsing attributes/types work, given that we currently rely on some extremely complicated nested parser logic which is quite problematic for a myriad of reasons; unecessary complexity(we create a nested source manager/lexer/etc.), diagnostic locations can be off/wrong given string escaping, etc. Differential Revision: https://reviews.llvm.org/D118505 | 3 年前 | |
[mlir:Parser] Don't use strings for the "ugly" form of Attribute/Type syntax This commit refactors the syntax of "ugly" attribute/type formats to not use strings for wrapping. This means that moving forward attirbutes and type formats will always need to be in some recognizable form, i.e. if they use incompatible characters they will need to manually wrap those in a string, the framework will no longer do it automatically. This has the benefit of greatly simplifying how parsing attributes/types work, given that we currently rely on some extremely complicated nested parser logic which is quite problematic for a myriad of reasons; unecessary complexity(we create a nested source manager/lexer/etc.), diagnostic locations can be off/wrong given string escaping, etc. Differential Revision: https://reviews.llvm.org/D118505 | 3 年前 | |
[mlir] Allow for attaching external resources to .mlir files This commit enables support for providing and processing external resources within MLIR assembly formats. This is a mechanism with which dialects, and external clients, may attach additional information when printing IR without that information being encoded in the IR itself. External resources are not uniqued within the MLIR context, are not attached directly to any operation, and are solely intended to live and be processed outside of the immediate IR. There are many potential uses of this functionality, for example MLIR's pass crash reproducer could utilize this to attach the pass resource executing when a crash occurs. Other types of uses may be embedding large amounts of binary data, such as weights in ML applications, that shouldn't be copied directly into the MLIR context, but need to be kept adjacent to the IR. External resources are encoded using a key-value pair nested within a dictionary anchored by name either on a dialect, or an externally registered entity. The key is an identifier used to disambiguate the data. The value may be stored in various limited forms, but general encodings use a string (human readable) or blob format (binary). Within the textual format, an example may be of the form: `` mlir {-# // The dialect_resources section within the file-level metadata // dictionary is used to contain any dialect resource entries. dialect_resources: { // Here is a dictionary anchored on "foo_dialect", which is a dialect // namespace. foo_dialect: { // some_dialect_resource is a key to be interpreted by the dialect, // and used to initialize/configure/etc. some_dialect_resource: "Some important resource value" } }, // The external_resources section within the file-level metadata // dictionary is used to contain any non-dialect resource entries. external_resources: { // Here is a dictionary anchored on "mlir_reproducer", which is an // external entity representing MLIR's crash reproducer functionality. mlir_reproducer: { // pipeline is an entry that holds a crash reproducer pipeline // resource. pipeline: "func.func(canonicalize,cse)" } } `` Differential Revision: https://reviews.llvm.org/D126446 | 3 年前 | |
[mlir] check whether region and block visitors are interrupted The visitor functions for Region and Block types did not always check the value returned by recursive calls. This caused the top-level visitor invocation to return WalkResult::advance() even if one or more recursive invocations returned WalkResult::interrupt(). This patch fixes the problem by check if any recursive call is interrupted, and if so, return WalkResult::interrupt(). Reviewed By: dcaballe Differential Revision: https://reviews.llvm.org/D129718 | 3 年前 | |
[mlir] check whether region and block visitors are interrupted The visitor functions for Region and Block types did not always check the value returned by recursive calls. This caused the top-level visitor invocation to return WalkResult::advance() even if one or more recursive invocations returned WalkResult::interrupt(). This patch fixes the problem by check if any recursive call is interrupted, and if so, return WalkResult::interrupt(). Reviewed By: dcaballe Differential Revision: https://reviews.llvm.org/D129718 | 3 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Split out various tests from IR/invalid.mlir This file contains a huge number of tests that should really be in different dialect/files. It is monolothic because of the legacy surrounding the old standard dialect, affine operations, etc. Splitting this up makes the tests much more maintainable given that they are now group with other similar tests. | 3 年前 | |
[mlir][NFC] Split out various tests from IR/invalid.mlir This file contains a huge number of tests that should really be in different dialect/files. It is monolothic because of the legacy surrounding the old standard dialect, affine operations, etc. Splitting this up makes the tests much more maintainable given that they are now group with other similar tests. | 3 年前 | |
[mlir][NFC] Split out various tests from IR/invalid.mlir This file contains a huge number of tests that should really be in different dialect/files. It is monolothic because of the legacy surrounding the old standard dialect, affine operations, etc. Splitting this up makes the tests much more maintainable given that they are now group with other similar tests. | 3 年前 | |
[mlir] Allow for attaching external resources to .mlir files This commit enables support for providing and processing external resources within MLIR assembly formats. This is a mechanism with which dialects, and external clients, may attach additional information when printing IR without that information being encoded in the IR itself. External resources are not uniqued within the MLIR context, are not attached directly to any operation, and are solely intended to live and be processed outside of the immediate IR. There are many potential uses of this functionality, for example MLIR's pass crash reproducer could utilize this to attach the pass resource executing when a crash occurs. Other types of uses may be embedding large amounts of binary data, such as weights in ML applications, that shouldn't be copied directly into the MLIR context, but need to be kept adjacent to the IR. External resources are encoded using a key-value pair nested within a dictionary anchored by name either on a dialect, or an externally registered entity. The key is an identifier used to disambiguate the data. The value may be stored in various limited forms, but general encodings use a string (human readable) or blob format (binary). Within the textual format, an example may be of the form: `` mlir {-# // The dialect_resources section within the file-level metadata // dictionary is used to contain any dialect resource entries. dialect_resources: { // Here is a dictionary anchored on "foo_dialect", which is a dialect // namespace. foo_dialect: { // some_dialect_resource is a key to be interpreted by the dialect, // and used to initialize/configure/etc. some_dialect_resource: "Some important resource value" } }, // The external_resources section within the file-level metadata // dictionary is used to contain any non-dialect resource entries. external_resources: { // Here is a dictionary anchored on "mlir_reproducer", which is an // external entity representing MLIR's crash reproducer functionality. mlir_reproducer: { // pipeline is an entry that holds a crash reproducer pipeline // resource. pipeline: "func.func(canonicalize,cse)" } } `` Differential Revision: https://reviews.llvm.org/D126446 | 3 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[AsmParser] Adopt emitWrongTokenError more, improving QoI This is a full audit of emitError calls, I took the opportunity to remove extranous parens and fix a couple cases where we'd generate multiple diagnostics for the same error. Differential Revision: https://reviews.llvm.org/D125355 | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir] Remove the type keyword from type alias definitions This was carry over from LLVM IR where the alias definition can be ambiguous, but MLIR type aliases have no such problems. Having the type keyword is superfluous and doesn't add anything. This commit drops it, which also nicely aligns with the syntax for attribute aliases (which doesn't have a keyword). Differential Revision: https://reviews.llvm.org/D125501 | 4 年前 | |
[mlir][Parser] Fix memory leak when failing to parse a forward declared block This commit fixes a failure edge case where we accidentally drop forward declared blocks in the error case. This allows for running the invalid.mlir test in asan mode now. Fixes #51387 Differential Revision: https://reviews.llvm.org/D130132 | 3 年前 | |
[AsmParser] Introduce a new "Argument" abstraction + supporting logic MLIR has a common pattern for "arguments" that uses syntax like %x : i32 {attrs} loc("sourceloc") which is implemented in adhoc ways throughout the codebase. The approach this uses is verbose (because it is implemented with parallel arrays) and inconsistent (e.g. lots of things drop source location info). Solve this by introducing OpAsmParser::Argument and make addRegion (which sets up BlockArguments for the region) take it. Convert the world to propagating this down. This means that we correctly capture and propagate source location information in a lot more cases (e.g. see the affine.for testcase example), and it also simplifies much code. Differential Revision: https://reviews.llvm.org/D124649 | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
Define a NoTerminator traits that allows operations with a single block region to not provide a terminator In particular for Graph Regions, the terminator needs is just a historical artifact of the generalization of MLIR from CFG region. Operations like Module don't need a terminator, and before Module migrated to be an operation with region there wasn't any needed. To validate the feature, the ModuleOp is migrated to use this trait and the ModuleTerminator operation is deleted. This patch is likely to break clients, if you're in this case: - you may iterate on a ModuleOp with getBody()->without_terminator(), the solution is simple: just remove the ->without_terminator! - you created a builder with Builder::atBlockTerminator(module_body), just use Builder::atBlockEnd(module_body) instead. - you were handling ModuleTerminator: it isn't needed anymore. - for generic code, a Block::mayNotHaveTerminator() may be used. Differential Revision: https://reviews.llvm.org/D98468 | 5 年前 | |
[mlir] add an option to print op stats in JSON Differential Revision: https://reviews.llvm.org/D127691 | 3 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
Implement recursive support into OperationEquivalence::isEquivalentTo() This allows to use OperationEquivalence to track structural comparison for equality between two operations. Differential Revision: https://reviews.llvm.org/D106422 | 4 年前 | |
Fix endian conversion of sub-byte types When convertEndianOfCharForBEmachine is called with elementBitWidth smaller than CHAR_BIT, the default case is invoked, but this does nothing at all and leaves the output array unchanged. Fix DenseIntOrFPElementsAttr::convertEndianOfArrayRefForBEmachine by not calling convertEndianOfCharForBEmachine in this case, and instead simply copying the input to the output (for sub-byte types, endian conversion is in fact a no-op). Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D125676 | 3 年前 | |
[mlir:Parser] Don't use strings for the "ugly" form of Attribute/Type syntax This commit refactors the syntax of "ugly" attribute/type formats to not use strings for wrapping. This means that moving forward attirbutes and type formats will always need to be in some recognizable form, i.e. if they use incompatible characters they will need to manually wrap those in a string, the framework will no longer do it automatically. This has the benefit of greatly simplifying how parsing attributes/types work, given that we currently rely on some extremely complicated nested parser logic which is quite problematic for a myriad of reasons; unecessary complexity(we create a nested source manager/lexer/etc.), diagnostic locations can be off/wrong given string escaping, etc. Differential Revision: https://reviews.llvm.org/D118505 | 3 年前 | |
Change elided large constant syntax to make it more explicit When the printer is requested to elide large constant, we emit an opaque attribute instead. This patch fills the dialect name with "elided_large_const" instead of "_" to remove some user confusion when they later try to consume it. Differential Revision: https://reviews.llvm.org/D117711 | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir] Remove the type keyword from type alias definitions This was carry over from LLVM IR where the alias definition can be ambiguous, but MLIR type aliases have no such problems. Having the type keyword is superfluous and doesn't add anything. This commit drops it, which also nicely aligns with the syntax for attribute aliases (which doesn't have a keyword). Differential Revision: https://reviews.llvm.org/D125501 | 4 年前 | |
[mlir] Set the namespace of the BuiltinDialect to 'builtin' Historically the builtin dialect has had an empty namespace. This has unfortunately created a very awkward situation, where many utilities either have to special case the empty namespace, or just don't work at all right now. This revision adds a namespace to the builtin dialect, and starts to cleanup some of the utilities to no longer handle empty namespaces. For now, the assembly form of builtin operations does not require the builtin. prefix. (This should likely be re-evaluated though) Differential Revision: https://reviews.llvm.org/D105149 | 4 年前 | |
[mlir] Move the Builtin FuncOp to the Func dialect This commit moves FuncOp out of the builtin dialect, and into the Func dialect. This move has been planned in some capacity from the moment we made FuncOp an operation (years ago). This commit handles the functional aspects of the move, but various aspects are left untouched to ease migration: func::FuncOp is re-exported into mlir to reduce the actual API churn, the assembly format still accepts the unqualified func. These temporary measures will remain for a little while to simplify migration before being removed. Differential Revision: https://reviews.llvm.org/D121266 | 4 年前 | |
[mlir] Set the namespace of the BuiltinDialect to 'builtin' Historically the builtin dialect has had an empty namespace. This has unfortunately created a very awkward situation, where many utilities either have to special case the empty namespace, or just don't work at all right now. This revision adds a namespace to the builtin dialect, and starts to cleanup some of the utilities to no longer handle empty namespaces. For now, the assembly form of builtin operations does not require the builtin. prefix. (This should likely be re-evaluated though) Differential Revision: https://reviews.llvm.org/D105149 | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
Change filecheck default to dump input on failure Having the input dumped on failure seems like a better default: I debugged FileCheck tests for a while without knowing about this option, which really helps to understand failures. Remove -dump-input-on-failure and the environment variable FILECHECK_DUMP_INPUT_ON_FAILURE which are now obsolete. Differential Revision: https://reviews.llvm.org/D81422 | 5 年前 | |
[mlir] Set the namespace of the BuiltinDialect to 'builtin' Historically the builtin dialect has had an empty namespace. This has unfortunately created a very awkward situation, where many utilities either have to special case the empty namespace, or just don't work at all right now. This revision adds a namespace to the builtin dialect, and starts to cleanup some of the utilities to no longer handle empty namespaces. For now, the assembly form of builtin operations does not require the builtin. prefix. (This should likely be re-evaluated though) Differential Revision: https://reviews.llvm.org/D105149 | 4 年前 | |
[mlir] Remove special case parsing/printing of func operations This was leftover from when the standard dialect was destroyed, and when FuncOp moved to the func dialect. Now that these transitions have settled a bit we can drop these. Most updates were handled using a simple regex: replace ^( *)func with $1func.func Differential Revision: https://reviews.llvm.org/D124146 | 4 年前 | |
[mlir] Prevent SubElementInterface from going into infinite recursion Since only mutable types and attributes can go into infinite recursion inside SubElementInterface::walkSubElement, and there are only a few of them (mutable types and attributes), we introduce new traits for Type and Attribute: TypeTrait::IsMutable and AttributeTrait::IsMutable, respectively. They indicate whether a type or attribute is mutable. Such traits are required if the ImplType defines a mutate function. Then, inside SubElementInterface, we use a set to record visited mutable types and attributes that have been visited before. Differential Revision: https://reviews.llvm.org/D127537 | 3 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
Add a mechanism for Dialects to provide a fallback for OpInterface This mechanism makes it possible for a dialect to not register all operations but still answer interface-based queries. This can useful for dialects that are "open" or connected to an external system and still interoperate with the compiler. It can also open up the possibility to have a more extensible compiler at runtime: the compiler does not need a pre-registration for each operation and the dialect can inject behavior dynamically. Reviewed By: rriddle, jpienaar Differential Revision: https://reviews.llvm.org/D93085 | 5 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir] Remove special case parsing/printing of func operations This was leftover from when the standard dialect was destroyed, and when FuncOp moved to the func dialect. Now that these transitions have settled a bit we can drop these. Most updates were handled using a simple regex: replace ^( *)func with $1func.func Differential Revision: https://reviews.llvm.org/D124146 | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update textual references of func to func.func in IR/Interface tests The special case parsing of func operations is being removed. | 4 年前 | |
[mlir][NFC] Update remaining textual references of un-namespaced func operations The special case parsing of operations in the func dialect is being removed, and operations will require the dialect namespace prefix. | 4 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 7 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 |