- May 28, 2020
-
-
MaheshRavishankar authored
operands of Generic ops. Unit-extent dimensions are typically used for achieving broadcasting behavior. The pattern added (along with canonicalization patterns added previously) removes the use of unit-extent dimensions, and instead uses a more canonical representation of the computation. This new pattern is not added as a canonicalization for now since it entails adding additional reshape operations. A pass is added to exercise these patterns, along with an API entry to populate a patterns list with these patterns. Differential Revision: https://reviews.llvm.org/D79766
-
Alex Zinenko authored
D80142 restructured MLIR-to-GPU-binary conversion to support multiple targets. It also modified cmake files to link relevant LLVM components in test/lib, which broke shared-library builds, and likely made the conversions unusable outside mlir-opt (or other tools that link in test library targets). Link these components to GPUCommon instead. Differential Revision: https://reviews.llvm.org/D80739
-
Jacques Pienaar authored
-
Jacques Pienaar authored
This allows constructing operand adaptor from existing op (useful for commonalizing verification as I want to do in a follow up). I also add ability to use member initializers for the generated adaptor constructors for convenience. Differential Revision: https://reviews.llvm.org/D80667
-
Jean-Michel Gorius authored
-
Frederik Gossen authored
The operand of `from_extent_tensor` is now of the same index type as the result type of the inverse operation `to_extent_tensor`. Differential Revision: https://reviews.llvm.org/D80283
-
Wen-Heng (Jack) Chung authored
Make ConvertKernelFuncToCubin pass to be generic: - Rename to ConvertKernelFuncToBlob. - Allow specifying triple, target chip, target features. - Initializing LLVM backend is supplied by a callback function. - Lowering process from MLIR module to LLVM module is via another callback. - Change mlir-cuda-runner to adopt the revised pass. - Add new tests for lowering to ROCm HSA code object (HSACO). - Tests for CUDA and ROCm are kept in separate directories. Differential Revision: https://reviews.llvm.org/D80142
-
Frederik Gossen authored
The operation `num_elements` determines the number of elements for a given shape. That is the product of its dimensions. Differential Revision: https://reviews.llvm.org/D80281
-
Frederik Gossen authored
Add the two conversion operations `index_to_size` and `size_to_index` to the shape dialect. This facilitates the conversion of index types between the shape and the standard dialect. Differential Revision: https://reviews.llvm.org/D80280
-
Alexander Belyaev authored
Differential Revision: https://reviews.llvm.org/D80705
-
Frederik Gossen authored
`Shape_ConstSizeOp` Fix places that refer to `shape.type` instead of `shape.shape`. Differential Revision: https://reviews.llvm.org/D80278
-
Frederik Gossen authored
Purely cosmetic change. The operation implementations in `Shape.cpp` are now lexicographic order. Differential Revision: https://reviews.llvm.org/D80277
-
Mehdi Amini authored
This changes will catch error where C++ op are used without being registered, either through creation with the OpBuilder or when trying to cast to the C++ op. Differential Revision: https://reviews.llvm.org/D80651
-
- May 27, 2020
-
-
MaheshRavishankar authored
Differential Revision: https://reviews.llvm.org/D80664
-
Sean Silva authored
Summary: Index is the proper type for storing shapes when constant folding, so this fixes the previous code (which was using i64). Differential Revision: https://reviews.llvm.org/D80600
-
Sean Silva authored
Summary: In a follow-up, I'll update the Shape dialect to use this instead of I64ElementsAttr. Differential Revision: https://reviews.llvm.org/D80601
-
Sean Silva authored
I just spent a bunch of time debugging a mysterious bug that ended being due to my SmallVector getting passed to the Args&... overload instead of the MutableArrayRef overload, with disastrous results. I appreciate the intent of this API, but for a function that does a bunch of unsafe casts, adding in potential overload confusion is just too much C++ footgun. If we end up needing this functionality, having something like a separate `packArgs(Args&...) -> SmallVector` overload would be preferable. Turns out this API is unused and untested (even out of tree as far as I can tell, modulo the optional passing of no args to the other invoke as I fixed in this patch), so it's an easy fix -- just delete it and touch up the other overload. Differential Revision: https://reviews.llvm.org/D80607
-
Nicolas Vasilache authored
Undoing a spurious change that broke SFINAE for some out of core use cases.
-
MaheshRavishankar authored
Differential Revision: https://reviews.llvm.org/D80657
-
aartbik authored
Summary: Provides a representation of the linearized LLVM instrinsic. With tests and lowering implementation to LLVM IR dialect. Prepares better lowering for 2-D vector.transpose. Reviewers: nicolasvasilache, ftynse, reidtatge, bkramer, dcaballe Reviewed By: ftynse, dcaballe Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, stephenneuendorffer, Joonsoo, grosul1, frgossen, Kayjukh, jurahul, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80419
-
MaheshRavishankar authored
This allocation of a workgroup memory is lowered to a spv.globalVariable. Only static size allocation with element type being int or float is handled. The lowering does account for the element type that are not supported in the lowered spv.module based on the extensions/capabilities and adjusts the number of elements to get the same byte length. Differential Revision: https://reviews.llvm.org/D80411
-
David Truby authored
Summary: This includes a basic implementation for the OpenMP parallel operation without a custom pretty-printer and parser. The if, num_threads, private, shared, first_private, last_private, proc_bind and default clauses are included in this implementation. Currently the reduction clause is omitted as it is more complex and requires analysis to see if we can share implementation with the loop dialect. The allocate clause is also omitted. A discussion about the design of this operation can be found here: https://llvm.discourse.group/t/openmp-parallel-operation-design-issues/686 The current OpenMP Specification can be found here: https://www.openmp.org/wp-content/uploads/OpenMP-API-Specification-5.0.pdf Co-authored-by:
Kiran Chandramohan <kiran.chandramohan@arm.com> Reviewers: jdoerfert Subscribers: mgorny, yaxunl, kristof.beyls, guansong, mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, Joonsoo, grosul1, frgossen, Kayjukh, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79410
-
Jacques Pienaar authored
Take advantage of equality constrains to generate the type inference interface. This is used for equality and trivially built types. The type inference method is only generated when no type inference trait is specified already. This reorders verification that changes some test error messages. Differential Revision: https://reviews.llvm.org/D80484
-
Alex Zinenko authored
Now that OpBuilder is available in `build` functions, it becomes possible to populate the "then" and "else" regions directly when building the "if" operation. This is desirable in more structured forms of builders, especially in when conditionals are mixed with loops. Provide new `build` APIs taking callbacks for body constructors, similarly to scf::ForOp, and replace more clunky edsc::BlockBuilder uses with these. The original APIs remain available and go through the new implementation. Differential Revision: https://reviews.llvm.org/D80527
-
MaheshRavishankar authored
alloc/dealloc/copies. Add options to LinalgPromotion to use callbacks for implementating the allocation, deallocation of buffers used for the promoted subviews, and to copy data into and from the original subviews to the allocated buffers. Also some misc. cleanup of the code. Differential Revision: https://reviews.llvm.org/D80365
-
MaheshRavishankar authored
Modifying the loop nest builder for generating scf.parallel loops to not generate scf.parallel loops for non-parallel iterator types in Linalg operations. The existing implementation incorrectly generated scf.parallel for all tiled loops. It is rectified by refactoring logic used while lowering to loops that accounted for this. Differential Revision: https://reviews.llvm.org/D80188
-
Sean Silva authored
Summary: This op extracts an extent from a shape. This also is the first op which constant folds to shape.const_size, which revealed that shape.const_size needs a folder (ConstantLike ops seem to always need folders for the constant folding infra to work). Differential Revision: https://reviews.llvm.org/D80394
-
- May 26, 2020
-
-
Nicolas Vasilache authored
-
Nicolas Vasilache authored
-
Nicolas Vasilache authored
[mlir][Vector] Add more vector.contract -> outerproduct lowerings and fix vector.contract type inference. This revision expands the types of vector contractions that can be lowered to vector.outerproduct. All 8 permutation cases are support. The idiomatic manipulation of AffineMap written declaratively makes this straightforward. In the process a bug with the vector.contract verifier was uncovered. The vector shape verification part of the contract op is rewritten to use AffineMap composition. One bug in the vector `ops.mlir` test is fixed and a new case not yet captured is added to the vector`invalid.mlir` test. Differential Revision: https://reviews.llvm.org/D80393
-
Christian Sigg authored
Summary: Add DynamicMemRefType which can reference one of the statically ranked StridedMemRefType or a UnrankedMemRefType so that runner utils only need to be implemented once. There is definitely room for more clean up and unification, but I will keep that for follow-ups. Reviewers: nicolasvasilache Reviewed By: nicolasvasilache Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, stephenneuendorffer, Joonsoo, grosul1, frgossen, Kayjukh, jurahul, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80513
-
Nicolas Vasilache authored
This revision adds the additional lowering and exposes the patterns at a finer granularity for better programmatic reuse. The unit test makes use of the finer grained pattern for simpler checks. As the ContractionOpLowering is exposed programmatically, cleanup opportunities appear and static class methods are turned into free functions with static visibility. Differential Revision: https://reviews.llvm.org/D80375
-
Tharindu Rusira authored
line 164: typo? baz.add should be bar.add. `bar.add` -> `foo.add`
-
- May 25, 2020
-
-
Benjamin Kramer authored
This still allows `if (value)` while requiring an explicit cast when not in a boolean context. This means things like `std::set<Value>` will no longer compile. Differential Revision: https://reviews.llvm.org/D80497
-
George Mitenkov authored
Added pow intrinsic to LLVMIR dialect. Added a roundrip test for it. Differential Revision: https://reviews.llvm.org/D80248
-
Jacques Pienaar authored
* Enables using with more variadic sized operands; * Generate convenience accessors for attributes; - The accessor are named the same as their name in ODS and returns attribute type (not convenience type) and no derived attributes. This is first step to changing adapter to support verifying argument constraints before the op is even created. This does not change the name of adaptor nor does it require it except for ops with variadic operands to keep this change smaller. Considered creating separate adapter but decided against that given operands also require attributes in general (and definitely for verification of operands and attributes). Differential Revision: https://reviews.llvm.org/D80420
-
- May 21, 2020
-
-
Sean Silva authored
This assert just caught me, and this improved message would have saved me some time.
-
Thomas Raoux authored
Enable inset/extract/construct composite ops as well as access chain for cooperative matrix. ConstantComposite requires more change and will be done in a separate patch. Also fix the getNumElements function for coopMatrix per feedback from Jeff Bolz. The number of element is implementation dependent so it cannot be known at compile time. Differential Revision: https://reviews.llvm.org/D80321
-
Thomas Raoux authored
Adds support for cooperative matrix support for arithmetic and cast instructions. It also adds cooperative matrix store, muladd and matrixlength instructions which are part of the extension. Differential Revision: https://reviews.llvm.org/D80181
-
jerryyin authored
Summary: * Updated ROCDLOps tablegen * Added parsing and printing function for new intrinsic * Added unit tests Reviewers: ftynse Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, stephenneuendorffer, Joonsoo, grosul1, frgossen, Kayjukh, jurahul, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80233
-