- Oct 27, 2020
-
-
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
-
Alexander Belyaev authored
https://llvm.discourse.group/t/rfc-standard-memref-cast-ops/1454/15 Differential Revision: https://reviews.llvm.org/D90033
-
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
-
George Mitenkov authored
This patch introduces a SPIR-V runner. The aim is to run a gpu kernel on a CPU via GPU -> SPIRV -> LLVM conversions. This is a first prototype, so more features will be added in due time. - Overview The runner follows similar flow as the other runners in-tree. However, having converted the kernel to SPIR-V, we encode the bind attributes of global variables that represent kernel arguments. Then SPIR-V module is converted to LLVM. On the host side, we emulate passing the data to device by creating in main module globals with the same symbolic name as in kernel module. These global variables are later linked with ones from the nested module. We copy data from kernel arguments to globals, call the kernel function from nested module and then copy the data back. - Current state At the moment, the runner is capable of running 2 modules, nested one in another. The kernel module must contain exactly one kernel function. Also, the runner supports rank 1 integer memref types as arguments (to be scaled). - Enhancement of JitRunner and ExecutionEngine To translate nested modules to LLVM IR, JitRunner and ExecutionEngine were altered to take an optional (default to `nullptr`) function reference that is a custom LLVM IR module builder. This allows to customize LLVM IR module creation from MLIR modules. Reviewed By: ftynse, mravishankar Differential Revision: https://reviews.llvm.org/D86108
-
George Mitenkov authored
This patch introduces a pass for running `mlir-spirv-cpu-runner` - LowerHostCodeToLLVMPass. This pass emulates `gpu.launch_func` call in LLVM dialect and lowers the host module code to LLVM. It removes the `gpu.module`, creates a sequence of global variables that are later linked to the varables in the kernel module, as well as a series of copies to/from them to emulate the memory transfer to/from the host or to/from the device sides. It also converts the remaining Standard dialect into LLVM dialect, emitting C wrappers. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D86112
-
- Oct 24, 2020
-
-
Mehdi Amini authored
This dependency was already existing indirectly, but is now more direct since the registration relies on a inline function. This fixes the link of the tools with BFD.
-
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
-
Mehdi Amini authored
-
- Oct 23, 2020
-
-
Mehdi Amini authored
This reverts commit b22e2e4c. Investigating broken builds
-
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
-
Eugene Zhulenev authored
AsyncRuntime must be explicitly linked with LLVM pthreads Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D89983
-
Thomas Raoux authored
Add folder for the case where ExtractStridedSliceOp source comes from a chain of InsertStridedSliceOp. Also add a folder for the trivial case where the ExtractStridedSliceOp is a no-op. Differential Revision: https://reviews.llvm.org/D89850
-
Thomas Raoux authored
Differential Revision: https://reviews.llvm.org/D89853
-
Sean Silva authored
I just found I needed this in an upcoming patch, and it seems generally useful to have. Differential Revision: https://reviews.llvm.org/D90000
-
Frederik Gossen authored
-
Frederik Gossen authored
Extract buffer alias analysis from buffer placement. Differential Revision: https://reviews.llvm.org/D89902
-
zhanghb97 authored
This patch provides C API for MLIR affine expression. - Implement C API for methods of AffineExpr class. - Implement C API for methods of derived classes (AffineBinaryOpExpr, AffineDimExpr, AffineSymbolExpr, and AffineConstantExpr). Differential Revision: https://reviews.llvm.org/D89856
-
Julian Gross authored
Added optimization pass to convert heap-based allocs to stack-based allocas in buffer placement. Added the corresponding test file. Differential Revision: https://reviews.llvm.org/D89688
-
Christian Sigg authored
[mlir] Fix exiting OpPatternRewriteDriver::simplifyLocally after first iteration that didn't change the op. Before this change, we would run `maxIterations` if the first iteration changed the op. After this change, we exit the loop as soon as an iteration hasn't changed the op. Assuming that we have reached a fixed point when an iteration doesn't change the op, this doesn't affect correctness. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D89981
-
- Oct 22, 2020
-
-
Mehdi Amini authored
This reverts commit a8b0ae3b and commit f8fcff5a. The build with SHARED_LIBRARY=ON is broken.
-
Eugene Zhulenev authored
pthreads is not enabled for all builds by default Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D89967
-
Eugene Zhulenev authored
Lower from Async dialect to LLVM by converting async regions attached to `async.execute` operations into LLVM coroutines (https://llvm.org/docs/Coroutines.html): 1. Outline all async regions to functions 2. Add LLVM coro intrinsics to mark coroutine begin/end 3. Use MLIR conversion framework to convert all remaining async types and ops to LLVM + Async runtime function calls All `async.await` operations inside async regions converted to coroutine suspension points. Await operation outside of a coroutine converted to the blocking wait operations. Implement simple runtime to support concurrent execution of coroutines. Reviewed By: herhut Differential Revision: https://reviews.llvm.org/D89292
-
Alexander Belyaev authored
Reuse most code for printing/parsing/verification from SubViewOp. https://llvm.discourse.group/t/rfc-standard-memref-cast-ops/1454/15 Differential Revision: https://https://reviews.llvm.org/D89720
-
Alexander Belyaev authored
https://llvm.discourse.group/t/rfc-standard-memref-cast-ops/1454/15 Differential Revision: https://reviews.llvm.org/D89784
- Oct 21, 2020
-
-
rdzhabarov authored
[mlir] Simplify DDR matching patterns with equal operands for operators where it's applicable. Added documentation. This https://reviews.llvm.org/D89254 diff introduced implicit matching between same name operands. Differential Revision: https://reviews.llvm.org/D89598
-
Thomas Raoux authored
Forward missing attributes when creating the new transfer op otherwise the builder would use default values. Differential Revision: https://reviews.llvm.org/D89907
-
Lei Zhang authored
MLIRTransforms is needed to provide BufferizeTypeConverter definitions.
-
Stella Laurenzo authored
* Adds a new MlirOpPrintingFlags type and supporting accessors. * Adds a new mlirOperationPrintWithFlags function. * Adds a full featured python Operation.print method with all options and the ability to print directly to files/stdout in text or binary. * Adds an Operation.get_asm which delegates to print and returns a str or bytes. * Reworks Operation.__str__ to be based on get_asm. Differential Revision: https://reviews.llvm.org/D89848
-
Sean Silva authored
A "structural" type conversion is one where the underlying ops are completely agnostic to the actual types involved and simply need to update their types. An example of this is shape.assuming -- the shape.assuming op and the corresponding shape.assuming_yield op need to update their types accordingly to the TypeConverter, but otherwise don't care what type conversions are happening. Also, the previous conversion code would not correctly materialize conversions for the shape.assuming_yield op. This should have caused a verification failure, but shape.assuming's verifier wasn't calling RegionBranchOpInterface::verifyTypes (which for reasons can't be called automatically as part of the trait verification, and requires being called manually). This patch also adds that verification. Differential Revision: https://reviews.llvm.org/D89833
-
Sean Silva authored
A "structural" type conversion is one where the underlying ops are completely agnostic to the actual types involved and simply need to update their types. An example of this is scf.if -- the scf.if op and the corresponding scf.yield ops need to update their types accordingly to the TypeConverter, but otherwise don't care what type conversions are happening. To test the structural type conversions, it is convenient to define a bufferize pass for a dialect, which exercises them nicely. Differential Revision: https://reviews.llvm.org/D89757
-
Christian Sigg authored
Reviewed By: herhut Differential Revision: https://reviews.llvm.org/D89686
-
Christian Sigg authored
Reviewed By: herhut Differential Revision: https://reviews.llvm.org/D89262
-
Alex Zinenko authored
Docstrings for `__str__` method in many classes was recycling the constant string defined for `Type`, without being types themselves. Use proper docstrings instead. Since they are succint, use string literals instead of top-level constants to avoid further mistakes. Differential Revision: https://reviews.llvm.org/D89780
-
Alex Zinenko authored
The pybind class typedef for concrete attribute classes was erroneously deriving all of them from PyAttribute instead of the provided base class. This has not been triggering any error because only one level of the hierarchy is currently exposed. Differential Revision: https://reviews.llvm.org/D89779
-
Alex Zinenko authored
Values are ubiquitous in the IR, in particular block argument and operation results are Values. Define Python classes for BlockArgument, OpResult and their common ancestor Value. Define pseudo-container classes for lists of block arguments and operation results, and use these containers to access the corresponding values in blocks and operations. Differential Revision: https://reviews.llvm.org/D89778
-
- Oct 20, 2020
-
-
Federico Lebrón authored
Differential Revision: https://reviews.llvm.org/D89825
-
Tres Popp authored
This still satisfies the constraints required by the affine dialect and gives more flexibility in what iteration bounds can be used when loewring to the GPU dialect. Differential Revision: https://reviews.llvm.org/D89782
-