- 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
-
- Jul 17, 2020
-
-
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
-
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
-
-
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
-
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
-
-
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
-
- Jul 13, 2020
-
-
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
-
- Jul 11, 2020
-
-
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
-
Nicolas Vasilache authored
This revision folds vector.transfer operations by updating the `masked` bool array attribute when more unmasked dimensions can be discovered. Differential revision: https://reviews.llvm.org/D83586
-
aartbik authored
We temporarily had separate OUTER lowering (for matmat flavors) and AXPY lowering (for matvec flavors). With the new generalized "vector.outerproduct" semantics, these cases can be merged into a single lowering method. This refactoring will simplify future decisions on cost models and lowering heuristics. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D83585
-
aartbik authored
This specialization allows sharing more code where an AXPY follows naturally in cases where an OUTERPRODUCT on a scalar would be generated. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D83453
-
Nicolas Vasilache authored
TransposeOp are often followed by ExtractOp. In certain cases however, it is unnecessary (and even detrimental) to lower a TransposeOp to either a flat transpose (llvm.matrix intrinsics) or to unrolled scalar insert / extract chains. Providing foldings of ExtractOp mitigates some of the unnecessary complexity. Differential revision: https://reviews.llvm.org/D83487
-
Nicolas Vasilache authored
This revision adds support for vectorizing named and generic contraction ops to vector.contract. Cases in which the memref is 0-D are special cased to emit std.load/std.store instead of vector.transfer. Relevant tests are added. Differential revision: https://reviews.llvm.org/D83307
-
Nicolas Vasilache authored
This revision adds folding to ExtractOp by simply concatenating the position attributes.
-
ergawy authored
This commit augments spv.CopyMemory's implementation to support 2 memory access operands. Hence, more closely following the spec. The following changes are introduces: - Customize logic for spv.CopyMemory serialization and deserialization. - Add 2 additional attributes for source memory access operand. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D83241
-
- Jul 09, 2020
-
-
Jeremy Bruestle authored
Reviewed By: bondhugula, flaub Differential Revision: https://reviews.llvm.org/D82600
-
George Mitenkov authored
Added `getSizeInBytes()` function as a class member to several SPIR-V types: `ScalarType`, `ArrayType` and `VectorType`. This function aims at exposing the functionality of `getTypeNumBytes()` from `SPIRVLowering.cpp`. Support of more types will be added on demand. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D83285
-
Benjamin Kramer authored
-
Tres Popp authored
Summary: Added canonicalization and folding was: - Folding when either input is an attribute indicating a scalar input which can always be broadcasted. - Canonicalization where it can be determined that either input shape is a scalar. - Canonicalization where the partially specified input shapes can be proven to be broadcastable always. Differential Revision: https://reviews.llvm.org/D83194
-
- Jul 08, 2020
-
-
Alexander Belyaev authored
Summery: It's needed for correct work of BufferPlacement. Differential Revision: https://reviews.llvm.org/D83385
-
HazemAbdelhafez authored
Add MatrixTimesMatrix operation to SPIRV Dialect and add NoSideEffect trait to Matrix ops. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D82671
-
- Jul 07, 2020
-
-
Nicolas Vasilache authored
This revision adds foldings for ExtractOp operations that come from previous InsertOp. InsertOp have cumulative semantic where multiple chained inserts are necessary to produce the final value from which the extracts are obtained. Additionally, TransposeOp may be interleaved and need to be tracked in order to follow the producer consumer relationships and properly compute positions. Differential revision: https://reviews.llvm.org/D83150
-
Benjamin Kramer authored
vector.fma and mulf don't work on integers. Use a muli/addi pair or plain muli instead. Differential Revision: https://reviews.llvm.org/D83292
-
Lei Zhang authored
Similar to OwningModuleRef, OwningSPIRVModuleRef signals ownership transfer clearly. This is useful for APIs like spirv::deserialize, where a spirv::ModuleOp is returned by deserializing SPIR-V binary module. This addresses the ASAN error as reported in https://bugs.llvm.org/show_bug.cgi?id=46272 Differential Revision: https://reviews.llvm.org/D81652
-
River Riddle authored
These were largely leftover from when MLIR was a google project, and don't really follow LLVM guidelines.
-
- Jul 06, 2020
-
-
Rahul Joshi authored
- This trait will verify that all regions attached to an Op have no arguments - Fixes https://bugs.llvm.org/show_bug.cgi?id=46521 : Add trait NoRegionArguments Differential Revision: https://reviews.llvm.org/D83016
-
Nicolas Vasilache authored
The UnrollVectorPattern is can be used in a programmable fashion by: ``` OwningRewritePatternList patterns; patterns.insert<UnrollVectorPattern<AddFOp>>(ArrayRef<int64_t>{2, 2}, ctx); patterns.insert<UnrollVectorPattern<vector::ContractionOp>>( ArrayRef<int64_t>{2, 2, 2}, ctx); ... applyPatternsAndFoldGreedily(getFunction(), patterns); ``` Differential revision: https://reviews.llvm.org/D83064
-
- Jul 04, 2020
-
-
Mehdi Amini authored
This reverts commit 5f284385. This broke the build when -DDBUILD_SHARED_LIBS=ON is used.
-
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. Differential Revision: https://reviews.llvm.org/D82672
-
Uday Bondhugula authored
While lowering min/max pooling ops to loops, generate the right kind of load/stores (std or affine) instead of always generating std load/stores. Differential Revision: https://reviews.llvm.org/D83080
-