- 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
-
Mehdi Amini authored
-
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
-
Alexander Bosch authored
BufferizeTests. Summary: Added test operations to replace the LinalgDialect dependency in tests which use the buffer-deallocation, buffer-hoisting, buffer-loop-hoisting, promote-buffers-to-stack, buffer-placement-preparation-allowed-memref-resutls and buffer-placement-preparation pass. Adapted the corresponding tests cases and TestBufferPlacement.cpp. Differential Revision: https://reviews.llvm.org/D90037
-
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.
-
Mehdi Amini authored
This header was an initial early attempt at a crude C API for bindings, but it isn't used and redundant with the new API. At this point it only contributes to more confusion. Differential Revision: https://reviews.llvm.org/D90643
-
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
-
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
-
Rahul Joshi authored
Differential Revision: https://reviews.llvm.org/D90651
-
- 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
BufferPlacement is no longer part of bufferization. However, this test is an important test of "finalizing" bufferize passes. A "finalizing" bufferize conversion is one that performs a "full" conversion and expects all tensors to be gone from the program. This in particular involves rewriting funcs (including block arguments of the contained region), calls, and returns. The unique property of finalizing bufferization passes is that they cannot be done via a local transformation with suitable materializations to ensure composability (as other bufferization passes do). For example, if a call is rewritten, the callee needs to be rewritten otherwise the IR will end up invalid. Thus, finalizing bufferization passes require an atomic change to the entire program (e.g. the whole module). This new designation makes it clear also that it shouldn't be testing bufferization of linalg ops, so the tests have been updated to not use linalg.generic ops. (linalg.copy is still used as the "copy" op for copying into out-params) Differential Revision: https://reviews.llvm.org/D89979
-
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
-
Mehdi Amini authored
Leaking macros isn't a good practice when defining headers. This requires to duplicate the macro definition in every header though, but that seems like a better tradeoff right now. Differential Revision: https://reviews.llvm.org/D90633
-
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.
-
Frederik Gossen authored
This reverts commit 56299b1e. Cannot build with gcc/g++ 7.5.0.
-
Stella Laurenzo authored
-
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.
-
Arthur Eubanks authored
This reverts commit 10f2a0d6. More uint64_t overflows.
-
- Oct 30, 2020
-
-
Mehdi Amini authored
This option catches unexpected mismatch when a prefix is given to FileCheck on the command line but never matches a single line in the test. See http://lists.llvm.org/pipermail/llvm-dev/2020-October/146162.html for more info. Differential Revision: https://reviews.llvm.org/D90501
-
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
-
Arthur Eubanks authored
CallInst::updateProfWeight() creates branch_weights with i64 instead of i32. To be more consistent everywhere and remove lots of casts from uint64_t to uint32_t, use i64 for branch_weights. Reviewed By: davidxl Differential Revision: https://reviews.llvm.org/D88609
-
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)>)'
-