- 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
-
Thomas Raoux authored
Differential Revision: https://reviews.llvm.org/D90567
-
Lei Zhang authored
Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D90655
-
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
-
-
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
-
- Oct 30, 2020
-
-
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
-
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
-
- 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
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
-
Nicolas Vasilache authored
Linalg "tile-and-fuse" is currently exposed as a Linalg pass "-linalg-fusion" but only the mechanics of the transformation are currently relevant. Instead turn it into a "-test-linalg-greedy-fusion" pass which performs canonicalizations to enable more fusions to compose. This allows dropping the OperationFolder which is not meant to be used with the pattern rewrite infrastructure. Differential Revision: https://reviews.llvm.org/D90394
-
Tres Popp authored
The previous ordering continued to use the original assuming after replacing it which is not allowed. Now, inline the region from the old into the new before the replacement. Differential Revision: https://reviews.llvm.org/D90375
-
River Riddle authored
Often times the legality of inlining can change depending on if the callable is going to be inlined in-place, or cloned. For example, some operations are not allowed to be duplicated and can only be inlined if the original callable will cease to exist afterwards. The new `wouldBeCloned` flag allows for dialects to hook into this when determining legality. Differential Revision: https://reviews.llvm.org/D90360
-
River Riddle authored
In certain situations it isn't legal to inline a call operation, but this isn't something that is possible(at least not easily) to prevent with the current hooks. This revision adds a new hook so that dialects with call operations that shouldn't be inlined can prevent it. Differential Revision: https://reviews.llvm.org/D90359
-
- Oct 28, 2020
-
-
Sean Silva authored
This fixes a subtle issue, described in the comment starting with "Clone the op without the regions and inline the regions from the old op", which prevented this conversion from working on non-trivial examples. Differential Revision: https://reviews.llvm.org/D90203
-
Alexander Belyaev authored
Differential Revision: https://reviews.llvm.org/D90235
-
Kazuaki Ishizaki authored
fix typos in comments and documents Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D90089
-
John Demme authored
Enhance tblgen's declarative assembly format to allow `attr-dict` in custom directives. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D89772
-
MaheshRavishankar authored
This patch adds support for fusing linalg.indexed_generic op with linalg.tensor_reshape op by expansion, i.e. - linalg.indexed_generic op -> linalg.tensor_reshape op when the latter is expanding. - linalg.tensor_reshape op -> linalg.indexed_generic op when the former is folding. Differential Revision: https://reviews.llvm.org/D90082
-
- Oct 27, 2020
-
-
Sean Silva authored
Differential Revision: https://reviews.llvm.org/D90204
-
Christian Sigg authored
Reviewed By: ezhulenev Differential Revision: https://reviews.llvm.org/D90211
-
River Riddle authored
This class represents a rewrite pattern list that has been frozen, and thus immutable. This replaces the uses of OwningRewritePatternList in pattern driver related API, such as dialect conversion. When PDL becomes more prevalent, this API will allow for optimizing a set of patterns once without the need to do this per run of a pass. Differential Revision: https://reviews.llvm.org/D89104
-
River Riddle authored
There are several pieces of pattern rewriting infra in IR/ that really shouldn't be there. This revision moves those pieces to a better location such that they are easier to evolve in the future(e.g. with PDL). More concretely this revision does the following: * Create a Transforms/GreedyPatternRewriteDriver.h and move the apply*andFold methods there. The definitions for these methods are already in Transforms/ so it doesn't make sense for the declarations to be in IR. * Create a new lib/Rewrite library and move PatternApplicator there. This new library will be focused on applying rewrites, and will also include compiling rewrites with PDL. Differential Revision: https://reviews.llvm.org/D89103
-
MaheshRavishankar authored
Adds support for - Dropping unit dimension loops for indexed_generic ops. - Folding consecutive folding (or expanding) reshapes when the result (or src) is a scalar. - Fixes to indexed_generic -> generic fusion when zero-dim tensors are involved. Differential Revision: https://reviews.llvm.org/D90118
-
- Oct 26, 2020
-
-
Alex Zinenko authored
The alignment attribute in the 'alloca' op treats the '0' value as 'unset'. When parsing the custom form of the 'alloca' op, ignore the alignment attribute with if its value is '0' instead of actually creating it and producing a slightly different textually yet equivalent semantically form in the output. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D90179
-
Thomas Raoux authored
Based on discourse discussion, fix the doc string and remove examples with wrong semantic. Also fix insert_map semantic by adding missing operand for vector we are inserting into. Differential Revision: https://reviews.llvm.org/D89563
-
Nicolas Vasilache authored
This revision allows the fusion of the producer of input tensors in the consumer under a tiling transformation (which produces subtensors). Many pieces are still missing (e.g. support init_tensors, better refactor LinalgStructuredOp interface support, try to merge implementations and reuse code) but this still allows getting started. The greedy pass itself is just for testing purposes and will be extracted in a separate test pass. Differential revision: https://reviews.llvm.org/D89491
-
- Oct 24, 2020
-
-
Mehdi Amini authored
This has been deprecated for >1month now and removal was announced in: https://llvm.discourse.group/t/rfc-revamp-dialect-registration/1559/11 Differential Revision: https://reviews.llvm.org/D86356
-