- Nov 04, 2020
-
-
mikeurbach authored
Previously, they were only defined for `FuncOp`. To support this, `FunctionLike` needs a way to get an updated type from the concrete operation. This adds a new hook for that purpose, called `getTypeWithoutArgsAndResults`. For now, `FunctionLike` continues to assume the type is `FunctionType`, and concrete operations that use another type can hide the `getType`, `setType`, and `getTypeWithoutArgsAndResults` methods. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D90363
-
- Nov 03, 2020
-
-
Thomas Raoux authored
Differential Revision: https://reviews.llvm.org/D90474
-
Kiran Chandramohan authored
The OpenMP dialect include is only needed for translation and is not required in LLVM dialect. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D90510
-
River Riddle authored
* Use function_ref instead of std::function in several methods * Use ::get instead of ::getChecked for IntegerType. - It is already fully verified and constructing a mlir::Location can be extremely costly during parsing.
-
Thomas Raoux authored
Differential Revision: https://reviews.llvm.org/D90567
-
Lei Zhang authored
Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D90655
-
Mehdi Amini authored
This is an error prone behavior, I frequently have ~20 min debugging sessions when I hit an unexpected implicit nesting. This default makes the C++ API safer for users. Depends On D90669 Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D90671
-
Mehdi Amini authored
This simplifies a few parts of the pass manager, but in particular we don't add as many verifierpass as there are passes in the pipeline, and we can now enable/disable the verifier after the fact on an already built PassManager. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D90669
-
Mehdi Amini authored
This allows to use it on other operation, like a GPUModule for example.
-
Alexander Belyaev authored
https://llvm.discourse.group/t/rfc-standard-memref-cast-ops/1454/15 Differential Revision: https://reviews.llvm.org/D90377
-
Tres Popp authored
Because cstr operations allow more instruction reordering than asserts, we only lower cstr_broadcastable to std ops with cstr_require. This ensures that the more drastic lowering to asserts can happen specifically with the user's desire. Differential Revision: https://reviews.llvm.org/D89325
-
Diego Caballero authored
This patch renames AffineParallelNormalize to AffineLoopNormalize to make it more generic and be able to hold more loop normalization transformations in the future for affine.for and affine.parallel ops. Eventually, it could also be extended to support scf.for and scf.parallel. As a starting point for affine.for, the patch also adds support for removing single iteration affine.for ops to the the pass. Differential Revision: https://reviews.llvm.org/D90267
-
MaheshRavishankar authored
Reviewed By: ThomasRaoux Differential Revision: https://reviews.llvm.org/D90582
-
- Nov 02, 2020
-
-
River Riddle authored
This revision refactors the base Op/AbstractOperation classes to reduce the amount of generated code size when defining a new operation. The current scheme involves taking the address of functions defined directly on Op and Trait classes. This is problematic because even when these functions are empty/unused we still result in these functions being defined in the main executable. In this revision, we switch to using SFINAE and template type filtering to remove remove functions that are not needed/used. For example, if an operation does not define a custom `print` method we shouldn't define a templated `printAssembly` method for it. The same applies to parsing/folding/verification/etc. This dropped MLIR code size for a large downstream library by ~10%(~1 mb in an opt build). Differential Revision: https://reviews.llvm.org/D90196
-
Benjamin Kramer authored
Looks like we have a blind spot in the testing matrix. AsyncRegionRewriter.cpp: In member function ‘virtual void {anonymous}::GpuAsyncRegionPass::runOnFunction()’: AsyncRegionRewriter.cpp:113:16: internal compiler error: in replace_placeholders_r, at cp/tree.c:2804 if (getFunction() ~~~~~~~~~~~~~ .getRegion() ~~~~~~~~~~~~ .walk(Callback{OpBuilder{&getContext()}}) ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
Rahul Joshi authored
- Add standard dialect operations to define global variables with memref types and to retrieve the memref for to a named global variable - Extend unit tests to test verification for these operations. Differential Revision: https://reviews.llvm.org/D90337
-
Sean Silva authored
This is the most basic possible finalizing bufferization pass, which I also think is sufficient for most new use cases. The more concentrated nature of this pass also greatly clarifies the invariants that it requires on its input to safely transform the program (see the pass description in Passes.td). With this pass, I have now upstreamed practically all of the bufferizations from npcomp (the exception being std.constant, which can be upstreamed when std.global_memref lands: https://llvm.discourse.group/t/rfc-global-variables-in-mlir/2076/16 ) Differential Revision: https://reviews.llvm.org/D90205
-
Thomas Raoux authored
Differential Revision: https://reviews.llvm.org/D90183
-
Stella Laurenzo authored
Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D90583
-
Frederik Gossen authored
This reverts commit dbae3d50. Cannot build with gcc/g++ 7.5.0.
-
Stella Laurenzo authored
* Finishes support for Context, InsertionPoint and Location to be carried by the thread using context managers. * Introduces type casters and utilities so that DefaultPyMlirContext and DefaultPyLocation in method signatures does the right thing (allows explicit or gets from the thread context). * Extend the rules for the thread context stack to handle nesting, appropriately inheriting and clearing depending on whether the context is the same. * Refactors all method signatures to follow the new convention on trailing parameters for defaulting parameters (loc, ip, context). When the objects are carried in the thread context, this allows most explicit uses of these values to be elided. * Removes the style guide section on putting accessors to construct global objects on the PyMlirContext: this style fails to make good use of the new facility since it is often the only thing remaining needing an MlirContext. * Moves Module parse/creation from mlir.ir.Context to static methods on mlir.ir.Module. * Moves Context.create_operation to a static Operation.create method. * Moves Type parsing from mlir.ir.Context to static methods on mlir.ir.Type. * Moves Attribute parsing from mlir.ir.Context to static methods on mlir.ir.Attribute. * Move Location factory methods from mlir.ir.Context to static methods on mlir.ir.Location. * Refactors the std dialect fake "ODS" generated code to take advantage of the new scheme. Differential Revision: https://reviews.llvm.org/D90547
-
- Oct 31, 2020
-
-
River Riddle authored
Switch to an index based loop instead of using enumerate.
-
- Oct 30, 2020
-
-
Sean Silva authored
This pass allows removing getResultConversionKind from BufferizeTypeConverter. This pass replaces the AppendToArgumentsList functionality. As far as I could tell, the only use of this functionlity is to perform the transformation that is implemented in this pass. Future patches will remove the getResultConversionKind machinery from BufferizeTypeConverter, but sending this patch for individual review for clarity. Differential Revision: https://reviews.llvm.org/D90071
-
ergawy authored
This commit adds a new library that merges/combines a number of spv modules into a combined one. The library has a single entry point: combine(...). To combine a number of MLIR spv modules, we move all the module-level ops from all the input modules into one big combined module. To that end, the combination process can proceed in 2 phases: (1) resolving conflicts between pairs of ops from different modules (2) deduplicate equivalent ops/sub-ops in the merged module. (TODO) This patch implements only the first phase. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D90477
-
Sean Silva authored
The bufferization patterns are moved to the .cpp file, which is preferred in the codebase when it makes sense. The LinalgToStandard patterns are kept a header because they are expected to be used individually. However, they are moved to LinalgToStandard.h which is the file corresponding to where they are defined. This also removes TensorCastOpConverter, which is handled by populateStdBufferizePatterns now. Eventually, the constant op lowering will be handled as well, but it there are currently holdups on moving it (see https://reviews.llvm.org/D89916). Differential Revision: https://reviews.llvm.org/D90254
-
Geoffrey Martin-Noble authored
This reverts commit 27324f28. Shared libs build is broken linking lib/libMLIRSPIRVModuleCombiner.so: ``` ModuleCombiner.cpp: undefined reference to `mlir::spirv::ModuleOp::addressing_model() ``` https://buildkite.com/mlir/mlir-core/builds/8988#e3d966b9-ea43-492e-a192-b28e71e9a15b
-
ergawy authored
This commit adds a new library that merges/combines a number of spv modules into a combined one. The library has a single entry point: combine(...). To combine a number of MLIR spv modules, we move all the module-level ops from all the input modules into one big combined module. To that end, the combination process can proceed in 2 phases: (1) resolving conflicts between pairs of ops from different modules (2) deduplicate equivalent ops/sub-ops in the merged module. (TODO) This patch implements only the first phase. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D90477
-
Mehdi Amini authored
This reverts commit 316593ce. Build is broken with: TestModuleCombiner.cpp:(.text._ZN12_GLOBAL__N_122TestModuleCombinerPass14runOnOperationEv+0x195): undefined reference to `mlir::spirv::combine(llvm::MutableArrayRef<mlir::spirv::ModuleOp>, mlir::OpBuilder&, llvm::function_ref<void (mlir::spirv::ModuleOp, llvm::StringRef, llvm::StringRef)>)'
-
ergawy authored
This commit adds a new library that merges/combines a number of spv modules into a combined one. The library has a single entry point: combine(...). To combine a number of MLIR spv modules, we move all the module-level ops from all the input modules into one big combined module. To that end, the combination process can proceed in 2 phases: (1) resolving conflicts between pairs of ops from different modules (2) deduplicate equivalent ops/sub-ops in the merged module. (TODO) This patch implements only the first phase. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D90022
-
Eugene Zhulenev authored
Add support for lowering `async.execute` operations with token dependencies Example: ``` %dep = ... : !async.token %token = async.execute[%dep] { ... } ``` Token dependencies lowered to `async.await` operations inside the outline coroutine body. Reviewed By: herhut, mehdi_amini, ftynse Differential Revision: https://reviews.llvm.org/D89958
-
Tres Popp authored
Differential Revision: https://reviews.llvm.org/D90407
-
River Riddle authored
Previously they were separated into "instance" and "kind" aliases, and also required that the dialect know ahead of time all of the instances that would have a corresponding alias. This approach was very clunky and not ergonomic to interact with. The new approach is to provide the dialect with an instance of an attribute/type to provide an alias for, fully replacing the original split approach. Differential Revision: https://reviews.llvm.org/D89354
-
Mehdi Amini authored
It is semantically equivalent, but the intent was really lost there. This fixes a warning/error from MSVC as well, see PR48013
-
Stella Laurenzo authored
* Removes index based insertion. All insertion now happens through the insertion point. * Introduces thread local context managers for implicit creation relative to an insertion point. * Introduces (but does not yet use) binding the Context to the thread local context stack. Intent is to refactor all methods to take context optionally and have them use the default if available. * Adds C APIs for mlirOperationGetParentOperation(), mlirOperationGetBlock() and mlirBlockGetTerminator(). * Removes an assert in PyOperation creation that was incorrectly constraining. There is already a TODO to rework the keepAlive field that it was guarding and without the assert, it is no worse than the current state. Differential Revision: https://reviews.llvm.org/D90368
-
- Oct 29, 2020
-
-
Thomas Raoux authored
Fix semantic in the distribute integration test based on offline feedback. This exposed a bug in block distribution, we need to make sure the id is multiplied by the stride of the vector. Fix the transformation and unit test. Differential Revision: https://reviews.llvm.org/D89291
-
Christian Sigg authored
Do not use the pass yet, except in a test. Reviewed By: herhut Differential Revision: https://reviews.llvm.org/D89937
-
Christian Sigg authored
For the synchronous case, destroy the stream after synchronization. Sneak in a unrelated change to report why the gpu.wait conversion pattern didn't match. Reviewed By: herhut Differential Revision: https://reviews.llvm.org/D89933
-
Christian Sigg authored
This is a roll-forward of rGec7780ebdab4, now that the remaining gpu.launch_func have been converted to custom form in rGb22f111023ba. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D90420
-
Mehdi Amini authored
This reverts commit ec7780eb. One of the bot is crashing in a test related to this change.
-
Christian Sigg authored
Reviewed By: herhut Differential Revision: https://reviews.llvm.org/D89324
-