|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
82140ad7 |
| 08-Jul-2022 |
Jacques Pienaar <[email protected]> |
[mlir] Add method to populate default attributes
Previously default attributes were only usable by way of the ODS generated accessors, but this was undesirable as 1. The ODS getters could construct
[mlir] Add method to populate default attributes
Previously default attributes were only usable by way of the ODS generated accessors, but this was undesirable as 1. The ODS getters could construct Attribute each get request; 2. For non-C++ uses this would require either duplicating some of tee default attribute generating or generating additional bindings to generate methods; 3. Accessing op.getAttr("foo") and op.getFoo() would return different results; Generate method to populate default attributes that can be used to address these.
This merely adds this facility but does not employ by default on any path.
Differential Revision: https://reviews.llvm.org/D128962
show more ...
|
|
Revision tags: llvmorg-14.0.6 |
|
| #
064a08cd |
| 21-Jun-2022 |
Kazu Hirata <[email protected]> |
Don't use Optional::hasValue (NFC)
|
|
Revision tags: llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3 |
|
| #
0f304ef0 |
| 19-Jan-2022 |
River Riddle <[email protected]> |
[mlir] Add asserts when changing various MLIRContext configurations
This helps to prevent tsan failures when users inadvertantly mutate the context in a non-safe way.
Differential Revision: https:/
[mlir] Add asserts when changing various MLIRContext configurations
This helps to prevent tsan failures when users inadvertantly mutate the context in a non-safe way.
Differential Revision: https://reviews.llvm.org/D112021
show more ...
|
| #
77eee579 |
| 22-Feb-2022 |
River Riddle <[email protected]> |
[mlir] Refactor DialectRegistry delayed interface support into a general DialectExtension mechanism
The current dialect registry allows for attaching delayed interfaces, that are added to attrs/dial
[mlir] Refactor DialectRegistry delayed interface support into a general DialectExtension mechanism
The current dialect registry allows for attaching delayed interfaces, that are added to attrs/dialects/ops/etc. when the owning dialect gets loaded. This is clunky for quite a few reasons, e.g. each interface type has a separate tracking structure, and is also quite limiting. This commit refactors this delayed mutation of dialect constructs into a more general DialectExtension mechanism. This mechanism is essentially a registration callback that is invoked when a set of dialects have been loaded. This allows for attaching interfaces directly on the loaded constructs, and also allows for loading new dependent dialects. The latter of which is extremely useful as it will now enable dependent dialects to only apply in the contexts in which they are necessary. For example, a dialect dependency can now be conditional on if a user actually needs the interface that relies on it.
Differential Revision: https://reviews.llvm.org/D120367
show more ...
|
| #
9445b396 |
| 25-Feb-2022 |
Chia-hung Duan <[email protected]> |
[mlir] Support verification order (2/3)
This change gives explicit order of verifier execution and adds `hasRegionVerifier` and `verifyWithRegions` to increase the granularity of verifie
[mlir] Support verification order (2/3)
This change gives explicit order of verifier execution and adds `hasRegionVerifier` and `verifyWithRegions` to increase the granularity of verifier classification. The orders are as below,
1. InternalOpTrait will be verified first, they can be run independently. 2. `verifyInvariants` which is constructed by ODS, it verifies the type, attributes, .etc. 3. Other Traits/Interfaces that have marked their verifier as `verifyTrait` or `verifyWithRegions=0`. 4. Custom verifier which is defined in the op and has marked `hasVerifier=1`
If an operation has regions, then it may have the second phase,
5. Traits/Interfaces that have marked their verifier as `verifyRegionTrait` or `verifyWithRegions=1`. This implies the verifier needs to access the operations in its regions. 6. Custom verifier which is defined in the op and has marked `hasRegionVerifier=1`
Note that the second phase will be run after the operations in the region are verified. Based on the verification order, you will be able to avoid verifying duplicate things.
Reviewed By: Mogball
Differential Revision: https://reviews.llvm.org/D116789
show more ...
|
| #
0557c6a7 |
| 03-Feb-2022 |
Eugene Zhulenev <[email protected]> |
[mlir] Keep sorted vector of registered operation names for efficient lookup
I see a lot of array sorting in stack traces of our compiler, canonicalizer traverses this list every time it builds a pa
[mlir] Keep sorted vector of registered operation names for efficient lookup
I see a lot of array sorting in stack traces of our compiler, canonicalizer traverses this list every time it builds a pattern set, and it gets expensive very quickly.
Reviewed By: rriddle, mehdi_amini
Differential Revision: https://reviews.llvm.org/D118937
show more ...
|
| #
11067d71 |
| 13-Jan-2022 |
River Riddle <[email protected]> |
[mlir] Optimize OperationName construction and usage
When constructing an OperationName, the overwhelming majority of cases are from registered operations. This revision adds a non-locked lookup int
[mlir] Optimize OperationName construction and usage
When constructing an OperationName, the overwhelming majority of cases are from registered operations. This revision adds a non-locked lookup into the currently registered operations, which prevents locking in the common case. This revision also optimizes several uses of RegisteredOperationName that expect the operation to be registered, e.g. such as in OpBuilder.
These changes provides a reasonable speedup (5-10%) in some compilations, especially on platforms where locking is expensive.
Differential Revision: https://reviews.llvm.org/D117187
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc2 |
|
| #
63846a63 |
| 01-Jan-2022 |
Kazu Hirata <[email protected]> |
[mlir] Remove unused "using" (NFC)
Identified by misc-unused-using-decls.
|
| #
41a64338 |
| 24-Dec-2021 |
Mogball <[email protected]> |
[mlir] Add getNumThreads to MLIRContext
Querying threads directly from the thread pool fails if there is no thread pool or if multithreading is not enabled. Returns 1 by default.
Reviewed By: mehdi
[mlir] Add getNumThreads to MLIRContext
Querying threads directly from the thread pool fails if there is no thread pool or if multithreading is not enabled. Returns 1 by default.
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D116259
show more ...
|
| #
e5639b3f |
| 22-Dec-2021 |
Mehdi Amini <[email protected]> |
Fix more clang-tidy cleanups in mlir/ (NFC)
|
| #
02b6fb21 |
| 20-Dec-2021 |
Mehdi Amini <[email protected]> |
Fix clang-tidy issues in mlir/ (NFC)
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D115956
|
| #
ff459c1f |
| 16-Dec-2021 |
Mogball <[email protected]> |
[mlir] Fix invalidated reference when loading dependent dialects
When a dialect is loaded with `getOrLoadDialect`, its constructor may recurse and call `getOrLoadDialect` on a dependent dialect, whi
[mlir] Fix invalidated reference when loading dependent dialects
When a dialect is loaded with `getOrLoadDialect`, its constructor may recurse and call `getOrLoadDialect` on a dependent dialect, which may result in an insertion in the dialect map, invalidating the reference to the (previously null) dialect pointer.
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D115846
show more ...
|
| #
be0a7e9f |
| 07-Dec-2021 |
Mehdi Amini <[email protected]> |
Adjust "end namespace" comment in MLIR to match new agree'd coding style
See D115115 and this mailing list discussion: https://lists.llvm.org/pipermail/llvm-dev/2021-December/154199.html
Differenti
Adjust "end namespace" comment in MLIR to match new agree'd coding style
See D115115 and this mailing list discussion: https://lists.llvm.org/pipermail/llvm-dev/2021-December/154199.html
Differential Revision: https://reviews.llvm.org/D115309
show more ...
|
| #
4022152b |
| 04-Dec-2021 |
Mehdi Amini <[email protected]> |
Use LLVM_ATTRIBUTE_UNUSED to silent warning for static function used in assert only (NFC)
|
| #
e45705ad |
| 02-Dec-2021 |
Ulysse Beaugnon <[email protected]> |
[MLIR] Use a shared uniquer for affine maps and integer sets.
Affine maps and integer sets previously relied on a single lock for creating unique instances. In a multi-threaded setting, this lock be
[MLIR] Use a shared uniquer for affine maps and integer sets.
Affine maps and integer sets previously relied on a single lock for creating unique instances. In a multi-threaded setting, this lock becomes a contention point. This commit updates AffineMap and IntegerSet to use StorageUniquer instead. StorageUniquer internally uses sharded locks and thread-local caches to reduce contention. It is already used for affine expressions, types and attributes. On my local machine, this gives me a 5X speedup for an application that manipulates a lot of affine maps and integer sets.
This commit also removes the integer set uniquer threshold. The threshold was used to avoid adding integer sets with a lot of constraints to the hash_map containing unique instances, but the constraints and the integer set were still allocated in the same allocator and never freed, thus not saving any space expect for the hash-map entry.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D114942
show more ...
|
| #
803cec02 |
| 26-Nov-2021 |
Kazu Hirata <[email protected]> |
[mlir] Fix a warning
This patch fixes:
mlir/lib/IR/MLIRContext.cpp:1020:3: error: use of the 'nodiscard' attribute is a C++17 extension [-Werror,-Wc++17-extensions]
|
| #
c2280b55 |
| 26-Nov-2021 |
Arnab Dutta <[email protected]> |
[MLIR] Avoid creation of buggy affine maps when incorrect values of number of dimensions and number of symbols are provided.
We check whether the maximum index of dimensional identifier present in t
[MLIR] Avoid creation of buggy affine maps when incorrect values of number of dimensions and number of symbols are provided.
We check whether the maximum index of dimensional identifier present in the result expressions is less than dimCount (number of dimensional identifiers) argument passed in the AffineMap::get() and the maximum index of symbolic identifier present in the result expressions is less than symbolCount (number of symbolic identifiers) argument passed in AffineMap::get().
Reviewed By: nicolasvasilache, bondhugula
Differential Revision: https://reviews.llvm.org/D114238
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc1 |
|
| #
edc6c0ec |
| 17-Nov-2021 |
River Riddle <[email protected]> |
[mlir] Refactor AbstractOperation and OperationName
The current implementation is quite clunky; OperationName stores either an Identifier or an AbstractOperation that corresponds to an operation. Th
[mlir] Refactor AbstractOperation and OperationName
The current implementation is quite clunky; OperationName stores either an Identifier or an AbstractOperation that corresponds to an operation. This has several problems:
* OperationNames created before and after an operation are registered are different * Accessing the identifier name/dialect/etc. from an OperationName are overly branchy - they need to dyn_cast a PointerUnion to check the state
This commit refactors this such that we create a single information struct for every operation name, even operations that aren't registered yet. When an OperationName is created for an unregistered operation, we only populate the name field. When the operation is registered, we populate the remaining fields. With this we now have two new classes: OperationName and RegisteredOperationName. These both point to the same underlying operation information struct, but only RegisteredOperationName can assume that the operation is actually registered. This leads to a much cleaner API, and we can also move some AbstractOperation functionality directly to OperationName.
Differential Revision: https://reviews.llvm.org/D114049
show more ...
|
| #
195730a6 |
| 16-Nov-2021 |
River Riddle <[email protected]> |
[mlir][NFC] Replace references to Identifier with StringAttr
This is part of the replacement of Identifier with StringAttr.
Differential Revision: https://reviews.llvm.org/D113953
|
| #
120591e1 |
| 11-Nov-2021 |
River Riddle <[email protected]> |
[mlir] Replace usages of Identifier with StringAttr
Identifier and StringAttr essentially serve the same purpose, i.e. to hold a string value. Keeping these seemingly identical pieces of functionali
[mlir] Replace usages of Identifier with StringAttr
Identifier and StringAttr essentially serve the same purpose, i.e. to hold a string value. Keeping these seemingly identical pieces of functionality separate has caused problems in certain situations:
* Identifier has nice accessors that StringAttr doesn't * Identifier can't be used as an Attribute, meaning strings are often duplicated between Identifier/StringAttr (e.g. in PDL)
The only thing that Identifier has that StringAttr doesn't is support for caching a dialect that is referenced by the string (e.g. dialect.foo). This functionality is added to StringAttr, as this is useful for StringAttr in generally the same ways it was useful for Identifier.
Differential Revision: https://reviews.llvm.org/D113536
show more ...
|
| #
4ba9d9c8 |
| 24-Oct-2021 |
Kazu Hirata <[email protected]> |
Use StringRef::contains (NFC)
|
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4 |
|
| #
a32300a6 |
| 15-Sep-2021 |
Mehdi Amini <[email protected]> |
Make the --mlir-disable-threading command line option overrides the C++ API usage
This seems in-line with the intent and how we build tools around it. Update the description for the flag accordingly
Make the --mlir-disable-threading command line option overrides the C++ API usage
This seems in-line with the intent and how we build tools around it. Update the description for the flag accordingly. Also use an injected thread pool in MLIROptMain, now we will create threads up-front and reuse them across split buffers.
Differential Revision: https://reviews.llvm.org/D109802
show more ...
|
|
Revision tags: llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init |
|
| #
6bbbd7b4 |
| 01-Jul-2021 |
Mehdi Amini <[email protected]> |
Update MLIRContext to allow injecting an external ThreadPool (NFC)
The context can be created with threading disabled, to avoid creating a thread pool that may be destroyed when injecting another on
Update MLIRContext to allow injecting an external ThreadPool (NFC)
The context can be created with threading disabled, to avoid creating a thread pool that may be destroyed when injecting another one later.
Differential Revision: https://reviews.llvm.org/D105302
show more ...
|
| #
fe3c425a |
| 28-Jun-2021 |
Eugene Zhulenev <[email protected]> |
[mlir] Destroy MLIRContext thread pool when disable multi threading
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D105057
|
|
Revision tags: llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3 |
|
| #
6569cf2a |
| 23-Jun-2021 |
River Riddle <[email protected]> |
[mlir] Add a ThreadPool to MLIRContext and refactor MLIR threading usage
This revision refactors the usage of multithreaded utilities in MLIR to use a common thread pool within the MLIR context, in
[mlir] Add a ThreadPool to MLIRContext and refactor MLIR threading usage
This revision refactors the usage of multithreaded utilities in MLIR to use a common thread pool within the MLIR context, in addition to a new utility that makes writing multi-threaded code in MLIR less error prone. Using a unified thread pool brings about several advantages:
* Better thread usage and more control We currently use the static llvm threading utilities, which do not allow multiple levels of asynchronous scheduling (even if there are open threads). This is due to how the current TaskGroup structure works, which only allows one truly multithreaded instance at a time. By having our own ThreadPool we gain more control and flexibility over our job/thread scheduling, and in a followup can enable threading more parts of the compiler.
* The static nature of TaskGroup causes issues in certain configurations Due to the static nature of TaskGroup, there have been quite a few problems related to destruction that have caused several downstream projects to disable threading. See D104207 for discussion on some related fallout. By having a ThreadPool scoped to the context, we don't have to worry about destruction and can ensure that any additional MLIR thread usage ends when the context is destroyed.
Differential Revision: https://reviews.llvm.org/D104516
show more ...
|