- Jul 20, 2020
-
-
Jakub Lichman authored
This commit adds functionality needed for implementation of convolutions with linalg.generic op. Since linalg.generic right now expects indexing maps to be just permutations, offset indexing needed in convolutions is not possible. Therefore in this commit we address the issue by adding support for symbols inside indexing maps which enables more advanced indexing. The upcoming commit will solve the problem of computing loop bounds from such maps. Differential Revision: https://reviews.llvm.org/D83158
-
Frederik Gossen authored
Fold `shape.shape_eq`. Differential Revision: https://reviews.llvm.org/D82533
-
Nicolas Vasilache authored
This revision improves and makes better use of OpInterfaces for the Vector dialect. Differential Revision: https://reviews.llvm.org/D84053
-
Alex Zinenko authored
Linkage support is already present in the LLVM dialect, and is being translated for globals other than functions. Translation support has been missing for functions because their conversion goes through a different code path than other globals. Differential Revision: https://reviews.llvm.org/D84149
-
- Jul 18, 2020
-
-
Yash Jain authored
Add lowering conversion from affine.parallel to scf.parallel. Differential Revision: https://reviews.llvm.org/D83239
-
- Jul 17, 2020
-
-
Nicolas Vasilache authored
Summary: The logic was conservative but inverted: cases that should remain unmasked became 1-D masked. Differential Revision: https://reviews.llvm.org/D84051
-
Pierre Oechsel authored
Summary: Vector contract patterns were only parameterized by a `vectorTransformsOptions`. As a result, even if an mlir file was containing several occurrences of `vector.contract`, all of them would be lowered in the same way. More granularity might be required . This Diff adds a `constraint` argument to each of these patterns which allows the user to specify with more precision on which `vector.contract` should each of the lowering apply. Differential Revision: https://reviews.llvm.org/D83960
-
Nicolas Vasilache authored
When the IfOp returns values, it can easily be obtained from one of the Values. However, when no values are returned, the information is lost. This revision lets the caller specify a capture IfOp* to return the produced IfOp. Differential Revision: https://reviews.llvm.org/D84025
-
- Jul 16, 2020
-
-
Lei Zhang authored
Differential Revision: https://reviews.llvm.org/D83982
-
Rahul Joshi authored
- This will enable tweaking IR printing options when enabling printing (for ex, tweak elideLargeElementsAttrs to create smaller IR logs) Differential Revision: https://reviews.llvm.org/D83930
-
Frederik Gossen authored
Lower `shape.shape_eq` to the `scf` (and `std`) dialect. For now, this lowering is limited to extent tensor operands. Differential Revision: https://reviews.llvm.org/D82530
-
Frederik Gossen authored
The issue that callback builders caused during rollback of conversion patterns has been resolved. We can use them again. See https://bugs.llvm.org/show_bug.cgi?id=46731 Differential Revision: https://reviews.llvm.org/D83932
-
Frederik Gossen authored
To make it clear when shape error values cannot occur the shape operations can operate on extent tensors. This change updates the lowering for `shape.reduce` accordingly. Differential Revision: https://reviews.llvm.org/D83944
-
Frederik Gossen authored
Allow `shape.reduce` to take both `shape.shape` and `tensor<?xindex>` as an argument. Differential Revision: https://reviews.llvm.org/D83943
-
Aden Grue authored
This also fixes the outdated use of `n_views` in the documentation. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D83795
-
- Jul 15, 2020
-
-
Stephen Neuendorffer authored
Some dialects have semantics which is not well represented by common SSA structures with dominance constraints. This patch allows operations to declare the 'kind' of their contained regions. Currently, two kinds are allowed: "SSACFG" and "Graph". The only difference between them at the moment is that SSACFG regions are required to have dominance, while Graph regions are not required to have dominance. The intention is that this Interface would be generated by ODS for existing operations, although this has not yet been implemented. Presumably, if someone were interested in code generation, we might also have a "CFG" dialect, which defines control flow, but does not require SSA. The new behavior is mostly identical to the previous behavior, since registered operations without a RegionKindInterface are assumed to contain SSACFG regions. However, the behavior has changed for unregistered operations. Previously, these were checked for dominance, however the new behavior allows dominance violations, in order to allow the processing of unregistered dialects with Graph regions. One implication of this is that regions in unregistered operations with more than one op are no longer CSE'd (since it requires dominance info). I've also reorganized the LangRef documentation to remove assertions about "sequential execution", "SSA Values", and "Dominance". Instead, the core IR is simply "ordered" (i.e. totally ordered) and consists of "Values". I've also clarified some things about how control flow passes between blocks in an SSACFG region. Control Flow must enter a region at the entry block and follow terminator operation successors or be returned to the containing op. Graph regions do not define a notion of control flow. see discussion here: https://llvm.discourse.group/t/rfc-allowing-dialects-to-relax-the-ssa-dominance-condition/833/53 Differential Revision: https://reviews.llvm.org/D80358
-
Uday Bondhugula authored
Fix clang tidy warnings in misc utilities - missing const or a star in declaration. Differential Revision: https://reviews.llvm.org/D83861
-
Rahul Joshi authored
- Add function `verifyTypes` that Op's can call to do type checking verification along the control flow edges described the Op's RegionBranchOpInterface. - We cannot rely on the verify methods on the OpInterface because the interface functions assume valid Ops, so they may crash if invoked on unverified Ops. (For example, scf.for getSuccessorRegions() calls getRegionIterArgs(), which dereferences getBody() block. If the scf.for is invalid with no body, this can lead to a segfault). `verifyTypes` can be called post op-verification to avoid this. Differential Revision: https://reviews.llvm.org/D82829
-
Stephan Herhut authored
This folds shape.broadcast where at least one operand is a scalar to the other operand. Also add an assemblyFormat for shape.broadcast and shape.concat. Differential Revision: https://reviews.llvm.org/D83854
-
Frederik Gossen authored
The use of the `scf.for` callback builder does not allow for a rollback of the emitted conversions. Instead, we populate the loop body through the conversion rewriter directly. Differential Revision: https://reviews.llvm.org/D83873
-
George Mitenkov authored
This patch addresses the comments from https://reviews.llvm.org/D83030 and https://reviews.llvm.org/D82639. `this->` is removed when not inside the template. Also, type conversion for `spv.func` takes `convertRegionTypes()` in order to apply type conversion on all blocks within the function. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D83786
-
Stephan Herhut authored
Summary: A reshape aliases its input memref, so it acts like a view. Differential Revision: https://reviews.llvm.org/D83773
-
Nicolas Vasilache authored
Summary: linalg.copy + linalg.fill can be used to create a padded local buffer. The `masked` attribute is only valid on this padded buffer. When forwarding to vector.transfer ops, the attribute must be reset conservatively. Differential Revision: https://reviews.llvm.org/D83782
-
- Jul 14, 2020
-
-
River Riddle authored
This adds a `parseOptionalAttribute` method to the OpAsmParser that allows for parsing optional attributes, in a similar fashion to how optional types are parsed. This also enables the use of attribute values as the first element of an assembly format optional group. Differential Revision: https://reviews.llvm.org/D83712
-
River Riddle authored
[mlir][DialectConversion] Emit an error if an operation marked as erased has live users after conversion Up until now, there has been an implicit agreement that when an operation is marked as "erased" all uses of that operation's results are guaranteed to be removed during conversion. How this works in practice is that there is either an assert/crash/asan failure/etc. This revision adds support for properly detecting when an erased operation has dangling users, emits and error and fails the conversion. Differential Revision: https://reviews.llvm.org/D82830
-
Uday Bondhugula authored
Add missing const - addresses clang tidy warnings. Differential Revision: https://reviews.llvm.org/D83794
-
Rahul Joshi authored
- Arguments of the first block of a region are considered region arguments. - Add API on Region class to deal with these arguments directly instead of using the front() block. - Changed several instances of existing code that can use this API - Fixes https://bugs.llvm.org/show_bug.cgi?id=46535 Differential Revision: https://reviews.llvm.org/D83599
-
Frederik Gossen authored
Differential Revision: https://reviews.llvm.org/D83118
-
Kiran Chandramohan authored
This patch introduces lowering of the OpenMP parallel operation to LLVM IR using the OpenMPIRBuilder. Functions topologicalSort and connectPhiNodes are generalised so that they work with operations also. connectPhiNodes is also made static. Lowering works for a parallel region with multiple blocks. Clauses and arguments of the OpenMP operation are not handled. Reviewed By: rriddle, anchu-rajendran Differential Revision: https://reviews.llvm.org/D81660
-
- Jul 13, 2020
-
-
Nicolas Vasilache authored
Summary: The native alignment may generally not be used when lowering a vector.transfer to the underlying load/store operation. This revision fixes the unmasked load/store alignment to match that of the masked path. Differential Revision: https://reviews.llvm.org/D83684
-
Rahul Joshi authored
[MLIR] Change ODS collective params build method to provide an empty default value for named attributes - Provide default value for `ArrayRef<NamedAttribute> attributes` parameter of the collective params build method. - Change the `genSeparateArgParamBuilder` function to not generate build methods that may be ambiguous with the new collective params build method. - This change should help eliminate passing empty NamedAttribue ArrayRef when the collective params build method is used - Extend op-decl.td unit test to make sure the ambiguous build methods are not generated. Differential Revision: https://reviews.llvm.org/D83517
-
Thomas Raoux authored
Right now slicing would assert if an operation with multiple results is in the slice. Differential Revision: https://reviews.llvm.org/D83627
-
Lei Zhang authored
Per the Vulkan's SPIR-V environment spec, "for the OpSRem and OpSMod instructions, if either operand is negative the result is undefined." So we cannot directly use spv.SRem/spv.SMod if either operand can be negative. Emulate it via spv.UMod. Because the emulation uses spv.SNegate, this commit also defines spv.SNegate. Differential Revision: https://reviews.llvm.org/D83679
-
Benjamin Kramer authored
Summary: These are semantically equivalent, but fmuladd allows decaying the op into fmul+fadd if there is no fma instruction available. llvm.fma lowers to scalar calls to libm fmaf, which is a lot slower. Reviewers: nicolasvasilache, aartbik, ftynse Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, liufengdb, stephenneuendorffer, Joonsoo, grosul1, Kayjukh, jurahul, msifontes Tags: #mlir Differential Revision: https://reviews.llvm.org/D83666
-
Frederik Gossen authored
Lower `shape.any` to its first operand. Differential Revision: https://reviews.llvm.org/D83123
-
- Jul 12, 2020
-
-
River Riddle authored
The namespace can be specified using the `cppNamespace` field. This matches the functionality already present on dialects, enums, etc. This fixes problems with using interfaces on operations in a different namespace than the interface was defined in. Differential Revision: https://reviews.llvm.org/D83604
-
- Jul 11, 2020
-
-
Mehdi Amini authored
This is NFC when there is no parsing error. Differential Revision: https://reviews.llvm.org/D83619
-
Mehdi Amini authored
Differential Revision: https://reviews.llvm.org/D83618
-
Yash Jain authored
Introduce pass to convert parallel affine.for op into 1-D affine.parallel op. Run using --affine-parallelize. Removes test-detect-parallel: pass for checking parallel affine.for ops. Signed-off-by:
Yash Jain <yash.jain@polymagelabs.com> Differential Revision: https://reviews.llvm.org/D83193
-
- Jul 10, 2020
-
-
Thomas Raoux authored
Improve the logic deciding if it is safe to hoist vector transfer read/write out of the loop. Change the logic to prevent hoisting operations if there are any unknown access to the memref in the loop no matter where the operation is. For other transfer read/write in the loop check if we can prove that they access disjoint memory and ignore them in this case. Differential Revision: https://reviews.llvm.org/D83538
-