#
7ed9cfc7 |
| 22-Dec-2020 |
Alex Zinenko <zinenko@google.com> |
[mlir] Remove static constructors from LLVMType
LLVMType contains numerous static constructors that were initially introduced for API compatibility with LLVM. Most of these merely forward to argumen
[mlir] Remove static constructors from LLVMType
LLVMType contains numerous static constructors that were initially introduced for API compatibility with LLVM. Most of these merely forward to arguments to `SpecificType::get` (MLIR defines classes for all types, unlike LLVM IR), while some introduce subtle semantics differences due to different modeling of MLIR types (e.g., structs are not auto-renamed in case of conflicts). Furthermore, these constructors don't match MLIR idioms and actively prevent us from making the LLVM dialect type system more open. Remove them and use `SpecificType::get` instead.
Depends On D93680
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D93681
show more ...
|
#
8de43b92 |
| 22-Dec-2020 |
Alex Zinenko <zinenko@google.com> |
[mlir] Remove instance methods from LLVMType
LLVMType contains multiple instance methods that were introduced initially for compatibility with LLVM API. These methods boil down to `cast` followed by
[mlir] Remove instance methods from LLVMType
LLVMType contains multiple instance methods that were introduced initially for compatibility with LLVM API. These methods boil down to `cast` followed by type-specific call. Arguably, they are mostly used in an LLVM cast-follows-isa anti-pattern. This doesn't connect nicely to the rest of the MLIR infrastructure and actively prevents it from making the LLVM dialect type system more open, e.g., reusing built-in types when appropriate. Remove such instance methods and replaces their uses with apporpriate casts and methods on derived classes. In some cases, the result may look slightly more verbose, but most cases should actually use a stricter subtype of LLVMType anyway and avoid the isa/cast.
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D93680
show more ...
|
Revision tags: llvmorg-11.0.1, llvmorg-11.0.1-rc2 |
|
#
26c8f908 |
| 18-Dec-2020 |
Thomas Raoux <thomasraoux@google.com> |
[mlir[[vector] Extend Transfer read/write ops to support tensor types.
Transfer_ops can now work on both buffers and tensor. Right now, lowering of the tensor case is not supported yet.
Differentia
[mlir[[vector] Extend Transfer read/write ops to support tensor types.
Transfer_ops can now work on both buffers and tensor. Right now, lowering of the tensor case is not supported yet.
Differential Revision: https://reviews.llvm.org/D93500
show more ...
|
#
563879b6 |
| 10-Dec-2020 |
Rahul Joshi <jurahul@google.com> |
[NFC] Use ConvertOpToLLVMPattern instead of ConvertToLLVMPattern.
- use ConvertOpToLLVMPattern to avoid explicit casting and in most cases the constructor can be reused to save a few lines of code
[NFC] Use ConvertOpToLLVMPattern instead of ConvertToLLVMPattern.
- use ConvertOpToLLVMPattern to avoid explicit casting and in most cases the constructor can be reused to save a few lines of code.
Differential Revision: https://reviews.llvm.org/D92989
show more ...
|
#
dcec2ca5 |
| 03-Dec-2020 |
Christian Sigg <csigg@google.com> |
Remove typeConverter from ConvertToLLVMPattern and use the existing one in ConversionPattern.
ftynse
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D92564
|
#
09f7a55f |
| 04-Dec-2020 |
River Riddle <riddleriver@gmail.com> |
[mlir][Types][NFC] Move all of the builtin Type classes to BuiltinTypes.h
This is part of a larger refactoring the better congregates the builtin structures under the BuiltinDialect. This also remov
[mlir][Types][NFC] Move all of the builtin Type classes to BuiltinTypes.h
This is part of a larger refactoring the better congregates the builtin structures under the BuiltinDialect. This also removes the problematic "standard" naming that clashes with the "standard" dialect, which is not defined within IR/. A temporary forward is placed in StandardTypes.h to allow time for downstream users to replaced references.
Differential Revision: https://reviews.llvm.org/D92435
show more ...
|
#
c95acf05 |
| 04-Dec-2020 |
Aart Bik <ajcbik@google.com> |
[mlir][vector][avx512] move avx512 lowering pass into general vector lowering
A separate AVX512 lowering pass does not compose well with the regular vector lowering pass. As such, it is at risk of c
[mlir][vector][avx512] move avx512 lowering pass into general vector lowering
A separate AVX512 lowering pass does not compose well with the regular vector lowering pass. As such, it is at risk of code duplication and lowering inconsistencies. This change removes the separate AVX512 lowering pass and makes it an "option" in the regular vector lowering pass (viz. vector dialect "augmented" with AVX512 dialect).
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D92614
show more ...
|
Revision tags: llvmorg-11.0.1-rc1 |
|
#
65fcddff |
| 19-Nov-2020 |
River Riddle <riddleriver@gmail.com> |
[mlir][BuiltinDialect] Resolve comments from D91571
* Move ops to a BuiltinOps.h * Add file comments
|
#
8b97e17d |
| 17-Nov-2020 |
Christian Sigg <csigg@google.com> |
[mlir] Simplify code generated by ConvertToLLVMPattern::getStridedElementPtr().
Make the interface match the one of ConvertToLLVMPattern::getDataPtr() (to be removed in a separate change).
Reviewed
[mlir] Simplify code generated by ConvertToLLVMPattern::getStridedElementPtr().
Make the interface match the one of ConvertToLLVMPattern::getDataPtr() (to be removed in a separate change).
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D91599
show more ...
|
#
73ca690d |
| 17-Nov-2020 |
River Riddle <riddleriver@gmail.com> |
[mlir][NFC] Remove references to Module.h and Function.h
These includes have been deprecated in favor of BuiltinDialect.h, which contains the definitions of ModuleOp and FuncOp.
Differential Revisi
[mlir][NFC] Remove references to Module.h and Function.h
These includes have been deprecated in favor of BuiltinDialect.h, which contains the definitions of ModuleOp and FuncOp.
Differential Revision: https://reviews.llvm.org/D91572
show more ...
|
#
3fffffa8 |
| 27-Oct-2020 |
River Riddle <riddleriver@gmail.com> |
[mlir][Pattern] Add a new FrozenRewritePatternList class
This class represents a rewrite pattern list that has been frozen, and thus immutable. This replaces the uses of OwningRewritePatternList in
[mlir][Pattern] Add a new FrozenRewritePatternList class
This class represents a rewrite pattern list that has been frozen, and thus immutable. This replaces the uses of OwningRewritePatternList in pattern driver related API, such as dialect conversion. When PDL becomes more prevalent, this API will allow for optimizing a set of patterns once without the need to do this per run of a pass.
Differential Revision: https://reviews.llvm.org/D89104
show more ...
|
#
b6eb26fd |
| 27-Oct-2020 |
River Riddle <riddleriver@gmail.com> |
[mlir][NFC] Move around the code related to PatternRewriting to improve layering
There are several pieces of pattern rewriting infra in IR/ that really shouldn't be there. This revision moves those
[mlir][NFC] Move around the code related to PatternRewriting to improve layering
There are several pieces of pattern rewriting infra in IR/ that really shouldn't be there. This revision moves those pieces to a better location such that they are easier to evolve in the future(e.g. with PDL). More concretely this revision does the following:
* Create a Transforms/GreedyPatternRewriteDriver.h and move the apply*andFold methods there. The definitions for these methods are already in Transforms/ so it doesn't make sense for the declarations to be in IR.
* Create a new lib/Rewrite library and move PatternApplicator there. This new library will be focused on applying rewrites, and will also include compiling rewrites with PDL.
Differential Revision: https://reviews.llvm.org/D89103
show more ...
|
#
b99bd771 |
| 27-Oct-2020 |
River Riddle <riddleriver@gmail.com> |
[mlir][Pattern] Refactor the Pattern class into a "metadata only" class
The Pattern class was originally intended to be used for solely matching operations, but that use never materialized. All of t
[mlir][Pattern] Refactor the Pattern class into a "metadata only" class
The Pattern class was originally intended to be used for solely matching operations, but that use never materialized. All of the pattern infrastructure uses RewritePattern, and the infrastructure for pure matching(Matchers.h) is implemented inline. This means that this class isn't a useful abstraction at the moment, so this revision refactors it to solely encapsulate the "metadata" of a pattern. The metadata includes the various state describing a pattern; benefit, root operation, etc. The API on PatternApplicator is updated to now operate on `Pattern`s as nothing special from `RewritePattern` is necessary.
This refactoring is also necessary for the upcoming use of PDL patterns alongside C++ rewrite patterns.
Differential Revision: https://reviews.llvm.org/D86258
show more ...
|
#
30e6033b |
| 08-Oct-2020 |
Nicolas Vasilache <nicolas.vasilache@gmail.com> |
[mlir][Linalg] Add TensorsToBuffers support for Constant ops.
This revision also inserts an end-to-end test that lowers tensors to buffers all the way to executable code on CPU.
Differential revisi
[mlir][Linalg] Add TensorsToBuffers support for Constant ops.
This revision also inserts an end-to-end test that lowers tensors to buffers all the way to executable code on CPU.
Differential revision: https://reviews.llvm.org/D88998
show more ...
|
Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6 |
|
#
322d0afd |
| 03-Oct-2020 |
Amara Emerson <amara@apple.com> |
[llvm][mlir] Promote the experimental reduction intrinsics to be first class intrinsics.
This change renames the intrinsics to not have "experimental" in the name.
The autoupgrader will handle lega
[llvm][mlir] Promote the experimental reduction intrinsics to be first class intrinsics.
This change renames the intrinsics to not have "experimental" in the name.
The autoupgrader will handle legacy intrinsics.
Relevant ML thread: http://lists.llvm.org/pipermail/llvm-dev/2020-April/140729.html
Differential Revision: https://reviews.llvm.org/D88787
show more ...
|
Revision tags: llvmorg-11.0.0-rc5 |
|
#
e9628955 |
| 28-Sep-2020 |
Aart Bik <ajcbik@google.com> |
[mlir] [VectorOps] Relaxed restrictions on vector.reduction types even more
Recently, restrictions on vector reductions were made more relaxed by accepting any width signless integer and floating-po
[mlir] [VectorOps] Relaxed restrictions on vector.reduction types even more
Recently, restrictions on vector reductions were made more relaxed by accepting any width signless integer and floating-point. This CL relaxes the restriction even more by including unsigned and signed integers.
Reviewed By: bkramer
Differential Revision: https://reviews.llvm.org/D88442
show more ...
|
#
54759cef |
| 28-Sep-2020 |
Aart Bik <ajcbik@google.com> |
[mlir] [VectorOps] changes to printing support for integers
(1) simplify integer printing logic by always using 64-bit print (2) add index support (since vector<16xindex> is planned to be added) (3)
[mlir] [VectorOps] changes to printing support for integers
(1) simplify integer printing logic by always using 64-bit print (2) add index support (since vector<16xindex> is planned to be added) (3) adjust naming convention print_x -> printX
Reviewed By: bkramer
Differential Revision: https://reviews.llvm.org/D88436
show more ...
|
Revision tags: llvmorg-11.0.0-rc4 |
|
#
b8880f5f |
| 25-Sep-2020 |
Aart Bik <ajcbik@google.com> |
[mlir] [VectorOps] generalize printing support for integers
This generalizes printing beyond just i1,i32,i64 and also accounts for signed and unsigned interpretation in the output.
Reviewed By: nic
[mlir] [VectorOps] generalize printing support for integers
This generalizes printing beyond just i1,i32,i64 and also accounts for signed and unsigned interpretation in the output.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D88290
show more ...
|
#
08e4f078 |
| 23-Sep-2020 |
Rahul Joshi <jurahul@google.com> |
[MLIR][NFC] Adopt use of TypeRange in build() methods.
- Use TypeRange instead of ArrayRef<Type> where possible. - Change some of the custom builders to also use TypeRange
Differential Revision: ht
[MLIR][NFC] Adopt use of TypeRange in build() methods.
- Use TypeRange instead of ArrayRef<Type> where possible. - Change some of the custom builders to also use TypeRange
Differential Revision: https://reviews.llvm.org/D87944
show more ...
|
Revision tags: llvmorg-11.0.0-rc3 |
|
#
2d76274b |
| 21-Sep-2020 |
Benjamin Kramer <benny.kra@googlemail.com> |
[mlir][VectorOps] Loosen restrictions on vector.reduction types
LLVM can deal with any integer or float type, don't arbitrarily restrict it to f32/f64/i32/i64.
Differential Revision: https://review
[mlir][VectorOps] Loosen restrictions on vector.reduction types
LLVM can deal with any integer or float type, don't arbitrarily restrict it to f32/f64/i32/i64.
Differential Revision: https://reviews.llvm.org/D88010
show more ...
|
#
3a577f54 |
| 09-Sep-2020 |
Christian Sigg <csigg@google.com> |
Rename MemRefDescriptor::getElementType() to MemRefDescriptor::getElementPtrType().
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D87284
|
#
239eff50 |
| 07-Sep-2020 |
Benjamin Kramer <benny.kra@googlemail.com> |
[mlir][VectorOps] Redo the scalar loop emission in VectoToSCF to pad instead of clipping
This replaces the select chain for edge-padding with an scf.if that performs the memory operation when the in
[mlir][VectorOps] Redo the scalar loop emission in VectoToSCF to pad instead of clipping
This replaces the select chain for edge-padding with an scf.if that performs the memory operation when the index is in bounds and uses the pad value when it's not. For transfer_write the same mechanism is used, skipping the store when the index is out of bounds.
The integration test has a bunch of cases of how I believe this should work.
Differential Revision: https://reviews.llvm.org/D87241
show more ...
|
#
0c2a4d3c |
| 04-Sep-2020 |
Benjamin Kramer <benny.kra@googlemail.com> |
[mlir][VectorOps] Simplify code. NFCI.
|
#
060c9dd1 |
| 03-Sep-2020 |
aartbik <ajcbik@google.com> |
[mlir] [VectorOps] Improve SIMD compares with narrower indices
When allowed, use 32-bit indices rather than 64-bit indices in the SIMD computation of masks. This runs up to 2x and 4x faster on a num
[mlir] [VectorOps] Improve SIMD compares with narrower indices
When allowed, use 32-bit indices rather than 64-bit indices in the SIMD computation of masks. This runs up to 2x and 4x faster on a number of AVX2 and AVX512 microbenchmarks.
Reviewed By: bkramer
Differential Revision: https://reviews.llvm.org/D87116
show more ...
|
#
2bf491c7 |
| 01-Sep-2020 |
Benjamin Kramer <benny.kra@googlemail.com> |
[mlir][VectorOps] Fail fast when a strided memref is passed to vector_transfer
Otherwise we'll silently miscompile things.
Differential Revision: https://reviews.llvm.org/D86951
|