Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mlir
AgeCommit message (Collapse)Author
2022-03-15NFC: Remove unterminated string from Python pyi file.Stella Laurenzo
2022-03-14[mlir][vector] Implement unrolling of ReductionOpMatthias Springer
Differential Revision: https://reviews.llvm.org/D121597
2022-03-14[mlir][vector] Add unrolling pattern for multidim_reduce opThomas Raoux
Implement the vectorLoopUnroll interface for MultiDimReduceOp and add a pattern to do the unrolling following the same interface other vector unroll patterns. Differential Revision: https://reviews.llvm.org/D121263
2022-03-14[mlir][bufferization] Update public MLIR documentationMatthias Springer
Differential Revision: https://reviews.llvm.org/D121071
2022-03-14[mlir][linalg] Replace linalg.fill by OpDSL variant.gysit
The revision removes the linalg.fill operation and renames the OpDSL generated linalg.fill_tensor operation to replace it. After the change, all named structured operations are defined via OpDSL and there are no handwritten operations left. A side-effect of the change is that the pretty printed form changes from: ``` %1 = linalg.fill(%cst, %0) : f32, tensor<?x?xf32> -> tensor<?x?xf32> ``` changes to ``` %1 = linalg.fill ins(%cst : f32) outs(%0 : tensor<?x?xf32>) -> tensor<?x?xf32> ``` Additionally, the builder signature now takes input and output value ranges as it is the case for all other OpDSL operations: ``` rewriter.create<linalg::FillOp>(loc, val, output) ``` changes to ``` rewriter.create<linalg::FillOp>(loc, ValueRange{val}, ValueRange{output}) ``` All other changes remain minimal. In particular, the canonicalization patterns are the same and the `value()`, `output()`, and `result()` methods are now implemented by the FillOpInterface. Depends On D120726 Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D120728
2022-03-14[mlir][linalg] Use explicit replace in canonicalization pattern (NFC).gysit
Introduce an explicit `replaceOp` call to enable the tracking of the producer LinalgOp. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D121369
2022-03-14Remove include_directories() from cmake `mlir_tablegen()` function (NFC)Mehdi Amini
This is present since the beginning, but does not seem needed by any in-tree target right now. This seems like the kind of thing to populate by the caller if needed. Differential Revision: https://reviews.llvm.org/D121565
2022-03-13[MLIR][Presburger][NFC] Fix doc for PresburgerSpace::numLocalsGroverkss
2022-03-13[MLIR][NFC] Fix deprecation message.Christian Sigg
2022-03-13[MLIR][Presburger] Add support for PresburgerRelationGroverkss
This patch adds supports for union of relations (PresburgerRelation). Along with this, support for PresburgerSet is also maintained. This patch is part of a series of patches to add support for relations in Presburger library. Reviewed By: arjunp Differential Revision: https://reviews.llvm.org/D121417
2022-03-13[MLIR][Python] Add SCFIfOp Python bindingchhzh123
Current generated Python binding for the SCF dialect does not allow users to call IfOp to create if-else branches on their own. This PR sets up the default binding generation for scf.if operation to address this problem. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D121076
2022-03-13[mlirTranslateMain] Add a customization callback.Chris Lattner
mlir-translate and related tools currently have a fixed set of flags that are built into Translation.cpp. This works for simple cases, but some clients want to change the default globally (e.g. default to allowing unregistered dialects without a command line flag), or support dialect-independent translations without having those translations register every conceivable dialect they could be used with (breaking modularity). This approach could also be applied to mlirOptMain to reduce the significant number of flags it has accumulated. Differential Revision: https://reviews.llvm.org/D120970
2022-03-12[MLIR] Fix block label parsing bugUday Bondhugula
Fix bug in `Block` label parsing: https://github.com/llvm/llvm-project/issues/54343 The `parseOptionalBlockArgList` method was doing the wrong thing (contrary to its doc comment) and its calling context was also incorrect. This led to a parse failure for something like "^bb0()". Fixes #54343 Differential Revision: https://reviews.llvm.org/D121503
2022-03-12[mlir] Update function referenced in comment (NFC)Jacques Pienaar
2022-03-12[CMake] Rename TARGET_TRIPLE to LLVM_TARGET_TRIPLEPetr Hosek
This clarifies that this is an LLVM specific variable and avoids potential conflicts with other projects. Differential Revision: https://reviews.llvm.org/D119918
2022-03-11[mlir][spirv] Make EntryPointABIAttr.local_size optionalIvan Butygin
* It doesn't required by OpenCL/Intel Level Zero and can be set programmatically. * Add GPU to spirv lowering in case when attribute is not present. * Set higher benefit to WorkGroupSizeConversion pattern so it will always try to lower first from the attribute. Differential Revision: https://reviews.llvm.org/D120399
2022-03-11[CommandLine] Remove `may only occur zero or one times!` errorFangrui Song
Early adoption of new technologies or adjusting certain code generation/IR optimization thresholds is often available through some cl::opt options (which have unstable surfaces). Specifying such an option twice will lead to an error. ``` % clang -c a.c -mllvm -disable-binop-extract-shuffle -mllvm -disable-binop-extract-shuffle clang (LLVM option parsing): for the --disable-binop-extract-shuffle option: may only occur zero or one times! % clang -c a.c -mllvm -hwasan-instrument-reads=0 -mllvm -hwasan-instrument-reads=0 clang (LLVM option parsing): for the --hwasan-instrument-reads option: may only occur zero or one times! % clang -c a.c -mllvm --scalar-evolution-max-arith-depth=32 -mllvm --scalar-evolution-max-arith-depth=16 clang (LLVM option parsing): for the --scalar-evolution-max-arith-depth option: may only occur zero or one times! ``` The option is specified twice, because there is sometimes a global setting and a specific file or project may need to override (or duplicately specify) the value. The error is contrary to the common practice of getopt/getopt_long command line utilities that let the last option win and the `getLastArg` behavior used by Clang driver options. I have seen such errors for several times. I think the error just makes users inconvenient, while providing very little value on discouraging production usage of unstable surfaces (this goal is itself controversial, because developers might not want to commit to a stable surface too early, or there is just some subtle codegen toggle which is infeasible to have a driver option). Therefore, I suggest we drop the diagnostic, at least before the diagnostic gets sufficiently better support for the overridding needs. Removing the error is a degraded error checking experience. I think this error checking behavior, if desirable, should be enabled explicitly by tools. Users preferring the behavior can figure out a way to do so. Reviewed By: jhenderson, rnk Differential Revision: https://reviews.llvm.org/D120455
2022-03-11[mlir][memref] memref.reinterpret_cast foldingIvan Butygin
* reinterpret_cast(reinterpret_cast(x)) -> reinterpret_cast(x) * reinterpret_cast(cast(x)) -> reinterpret_cast(x) * reinterpret_cast(subview(x)) -> reinterpret_cast(x) if subview offsets are 0 Differential Revision: https://reviews.llvm.org/D120242
2022-03-11[mlir][sparse][taco] Add a few unary operations.Bixia Zheng
Add operations -, abs, ceil and floor to the index notation. Add test cases. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D121388
2022-03-11[MLIR][python binding] Add OpaqueAttribute to python binding.Yun Long
Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D120847
2022-03-11[mlir] Support verification order (3/3)Chia-hung Duan
In this CL, update the function name of verifier according to the behavior. If a verifier needs to access the region then it'll be updated to `verifyRegions`. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D120373
2022-03-11[mlir][Vector] Modernize default lowering of vector transposeDiego Caballero
This patch removes an old recursive implementation to lower vector.transpose to extract/insert operations and replaces it with a iterative approach that leverages newer linearization/delinearization utilities. The patch should be NFC except by the order in which the extract/insert ops are generated. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D121321
2022-03-10[mlir][NVVM] Add ldmatrix op to NVVM dialectThomas Raoux
Differential Revision: https://reviews.llvm.org/D121347
2022-03-10[mlir][sparse] Improving error messages for openSparseTensorCOOwren romano
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D121333
2022-03-10[mlir][linalg] Add a few unary operations.Bixia Zheng
Add operations abs, ceil, floor, and neg to the C++ API and Python API. Add test cases. Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D121339
2022-03-10[MLIR][Presburger] Remove `spaceKind` from PresburgerSpaceGroverkss
This patch remove `spaceKind` from PresburgerSpace, making PresburgerSpace only a space supporting relations. Sets are still implemented in the same way, i.e. with a zero domain but instead the asserts to check if the space is still set are added to users of PresburgerSpace which treat it as a Set space. Reviewed By: arjunp Differential Revision: https://reviews.llvm.org/D121357
2022-03-10[mlir] ExecutionEngine: default enableObjectCache to falseEmilio Cota
The enableObjectCache option was added in https://reviews.llvm.org/rG06e8101034e, defaulting to false. However, the init code added there got its logic reversed (cache(enableObjectCache ? nullptr : new SimpleObjectCache()), which was fixed in https://reviews.llvm.org/rGd1186fcb04 by setting the default to true, thereby preserving the existing behavior even if it was unintentional. Default now the object cache to false as it was originally intended. While at it, mention in enableObjectCache's documentation how the cache can be dumped. Reviewed-by: mehdi_amini Differential Revision: https://reviews.llvm.org/D121291
2022-03-10[MLIR][OpenMP][NFC] Move the modifier testcases to correct directoryShraiysh Vaishay
This patch moves the testcases from `mlir/test/Target/LLVMIR/openmp-llvm-bad-schedule-modifier.mlir` to `mlir/test/Dialect/OpenMP/invalid.mlir` as they test the verifier (not the translation to LLVM IR). Reviewed By: NimishMishra Differential Revision: https://reviews.llvm.org/D120877
2022-03-10[MLIR] [CMake/Python] Fix ignored Python3_EXECUTABLEJohn Demme
On Windows (at least), cmake ignores Python3_EXECUTABLE unless the 'Interpreter' component is being found. If the user is specifying a different version than the latest installed (say, 3.8 vs 3.9) with the Python3_EXECUTABLE, cmake was using a combination of the newest version and the desired version. Mitigated by adding 'Interpreter' in the first invocation like the second one.
2022-03-10[OpenMP][mlir] Lowering for omp.atomic.updateShraiysh Vaishay
This patch adds lowering from omp.atomic.update to LLVM IR. Whenever a special LLVM IR instruction is available for the operation, `atomicrmw` instruction is emitted, otherwise a compare-exchange loop based update is emitted. Depends on D119522 Reviewed By: ftynse, peixin Differential Revision: https://reviews.llvm.org/D119657
2022-03-10[MLIR][Presburger] fix vector update in coalesceMichel Weber
When `addCoalescedPolyhedron` was called with `j == n - 1`, the `polyhedrons`-vector was not properly updated (the `IntegerPolyhedron` at position `n - 2` was "lost"). This patch adds special handling to that case and a regression testcase. Reviewed By: Groverkss Differential Revision: https://reviews.llvm.org/D121356
2022-03-10[MLIR][Presburger] Use IdKind for removeIdRange in PresburgerSpaceGroverkss
This patch moves PresburgerSpace::removeIdRange(idStart, idLimit) to PresburgerSpace::removeIdRange(kind, idStart, idLimit), i.e. identifiers can only be removed at once for a single kind. This makes users of PresburgerSpace to not assume any inside ordering of identifier kinds. Reviewed By: arjunp Differential Revision: https://reviews.llvm.org/D121079
2022-03-10[mlir][sparse] add end2end test for linalg.dot sparsificationAart Bik
Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D121344
2022-03-10[mlir][sparse] added linalg.dot to sparse kernel collectionAart Bik
Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D121315
2022-03-09[mlir][OpenMP] Generating enums in accordance with the guidelinesShraiysh Vaishay
This patch changes the enums generated from `OMP.td` for MLIR according to the enum naming guidelines in LLVM Coding Standards. This also helps the issues we had with `static` being a C++ keyword and also a value for the schedule clause. Enumerator naming guidelines: https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D120825
2022-03-09NFC. Clean up memref utils libraryUday Bondhugula
NFC. Clean up memref utils library. This library had a single function that was completely misplaced. MemRefUtils is expected to be (also per its comment) a library providing analysis/transforms utilities on memref dialect ops or memref types. However, in reality it had a helper that was depended upon by the MemRef dialect, i.e., it was a helper for the dialect ops library and couldn't contain anything that itself depends on the MemRef dialect. Move the single method to the memref dialect that will now allow actual utilities depending on the memref dialect to be placed in it. Put findDealloc in the `memref` namespace. This is a pure move. Differential Revision: https://reviews.llvm.org/D121273
2022-03-09[mlir] Make ShapedTypeComponents contructible from ShapeAdaptorChia-hung Duan
ValueShapeRange::getShape() returns ShapeAdaptor rather than ShapedType and ShapeAdaptor allows implicit conversion to bool. It ends up that ShapedTypeComponents can be constructed with ShapeAdaptor incorrectly. The reason is that the type trait std::is_constructible<ShapeStorageT, Arg>::value is fulfilled because ShapeAdaptor can be converted to bool and it can be used to construct ShapeStorageT. In the end, we won't give any warning or error message when doing things like inferredReturnShapes.emplace_back(valueShapeRange.getShape(0)); Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D120845
2022-03-09[mlir] Extend AffineForEmptyLoopFolderAmy Zhuang
Currently when we fold an empty loop, we assume that any loop with iterArgs returns its iterArgs in order, which is not always the case. It may return values defined outside of the loop or return its iterArgs out of order. This patch adds support to those cases. Reviewed By: dcaballe Differential Revision: https://reviews.llvm.org/D120776
2022-03-09[mlir][sparse] index support in sparse compiler codegenAart Bik
This revision adds support for the linalg.index to the sparse compiler pipeline. In essence, this adds the ability to refer to indices in the tensor index expression, as illustrated below: Y[i, j, k, l, m] = T[i, j, k, l, m] * i * j Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D121251
2022-03-09[mlir][NFC] Add various includes currently transitively found inRiver Riddle
BuiltinOps.h These includes are going to be removed from BuiltinOps.h in a followup when FuncOp is moved out of the Builtin dialect. This commit pre-emptively adds those includes to simplify the patch moving FuncOp.
2022-03-09[mlir:toy][NFC] Add comment blocks for toy operations.River Riddle
2022-03-08[mlir][spirv] Define spv.VectorTimesScalar opLei Zhang
Reviewed By: hanchung Differential Revision: https://reviews.llvm.org/D121247
2022-03-08[mlir][spirv] Fix spv.GLSL.{S|U}Clamp type checkingLei Zhang
It's fine to use any integer (vector) values regardless of the signedness. The opcode decides how to interpret the bits. Reviewed By: hanchung Differential Revision: https://reviews.llvm.org/D121238
2022-03-08[mlir][spirv] Handle another form of folding comparsion into clampLei Zhang
Reviewed By: hanchung Differential Revision: https://reviews.llvm.org/D121227
2022-03-08Revert "Fix link of libmlir.so by adding ExecutionEngine as dependency to ↵Mehdi Amini
GPUTransforms" This reverts commit b743850b736e4a89378be8bed61c1b3489b56d19. This didn't produce the expected result.
2022-03-08Fix link of libmlir.so by adding ExecutionEngine as dependency to GPUTransformsMehdi Amini
This feels like a layering violation, but it fixes the build. Fixes #54242 tools/mlir/lib/Dialect/GPU/CMakeFiles/obj.MLIRGPUTransforms.dir/Transforms/SerializeToHsaco.cpp.o:SerializeToHsaco.cpp:function (anonymous namespace)::SerializeToHsacoPass::optimizeLlvm(llvm::Module&, llvm::TargetMachine&): error: undefined reference to 'mlir::makeOptimizingTransformer(unsigned int, unsigned int, llvm::TargetMachine*)'
2022-03-08[mlir][SCF] Replace use of FuncOp with FunctionOpInterfaceRiver Riddle
There is nothing specific to FuncOp about the check, it can be changed to be interface based. Differential Revision: https://reviews.llvm.org/D121194
2022-03-08[mlir][MemRef] Change memref-expand to be a generic operation passRiver Riddle
This pass doesn't rely on any specific characteristics of FuncOp, and can just be a generic operation pass. Differential Revision: https://reviews.llvm.org/D121193
2022-03-08[mlir] Change ComplexToLLVM to be a generic passRiver Riddle
It is currently a module pass, but shouldn't be. All of the patterns are local conversions, and don't require anything about functions/modules. Differential Revision: https://reviews.llvm.org/D121192
2022-03-08[mlir] Update FuncOp conversion passes to ↵River Riddle
Pass/InterfacePass<FunctionOpInterface> These passes generally don't rely on any special aspects of FuncOp, and moving allows for these passes to be used in many more situations. The passes that obviously weren't relying on invariants guaranteed by a "function" were updated to be generic pass, the rest were updated to be FunctionOpinterface InterfacePasses. The test updates are NFC switching from implicit nesting (-pass -pass2) form to the -pass-pipeline form (generic passes do not implicitly nest as op-specific passes do). Differential Revision: https://reviews.llvm.org/D121190