| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Reland "[mlir] Add strided metadata range dataflow analysis" (#163403)" (#163408) This relands commit aa8499863ad23350da0912d99d189f306d0ea139. That commit was originally reverted because it caused failures in shared lib builds due to missing link dependencies. This patch relands the commit with the missing libs added. Signed-off-by: Fabian Mora <fabian.mora-cordero@amd.com> | 9 个月前 | |
[MLIR] print/parse resource handle key quoted and escaped (#119746) resource keys have the problem that you can’t parse them from mlir assembly if they have special or non-printable characters, but nothing prevents you from specifying such a key when you create e.g. a DenseResourceElementsAttr, and it works fine in other ways, including bytecode emission and parsing this PR solves the parsing by quoting and escaping keys with special or non-printable characters in mlir assembly, in the same way as symbols, e.g.: module attributes { fst = dense_resource<resource_fst> : tensor<2xf16>, snd = dense_resource<"resource\09snd"> : tensor<2xf16> } {} {-# dialect_resources: { builtin: { resource_fst: "0x0200000001000200", "resource\09snd": "0x0200000008000900" } } #-} by not quoting keys without special or non-printable characters, the change is effectively backwards compatible the change is tested by: 1. adding a test with a dense resource handle key with special characters to dense-resource-elements-attr.mlir 2. adding special and unprintable characters to some resource keys in the existing lit tests pretty-resources-print.mlir and mlir/test/Bytecode/resources.mlir | 1 年前 | |
[mlir] Add splitDebugFilename field in DIComplileUnitAttr. (#160704) Mostly mechanical changes to add the missing field. | 9 个月前 | |
[mlir][arith] Add support for sitofp, uitofp to ArithToAPFloat (#169284) Add support for arith.sitofp and arith.uitofp. | 8 个月前 | |
[MemRef] Remove memref.dim OffsetSizeAndStrideOpInterface folding (#169327) OffsetSizeAndStrideOpInterface does not specify whether it's operating on the input or output shape and in fact different ops implement this in different ways, which is also why SubviewOp is special cased here. This "marked as dynamic but not really dynamic" folding is better handled by shape inference, so just remove the bad fold. | 8 个月前 | |
| 8 个月前 | ||
[MLIR] Add verification that symbol operations must not have results (#168390) This patch adds verification to the SymbolOpInterface to enforce the design constraint that symbol operations must not produce SSA results, as documented in [Symbols and SymbolTables](https://mlir.llvm.org/docs/SymbolsAndSymbolTables/#defining-or-declaring-a-symbol). This is a follow-up of #168376 | 8 个月前 | |
[mlir][arith] Add support for sitofp, uitofp to ArithToAPFloat (#169284) Add support for arith.sitofp and arith.uitofp. | 8 个月前 | |
[mlir][SCF] Add scf::tileAndFuseConsumer that tiles a consumer into a given tiled loop nest. (#167634) The existing scf::tileAndFuseConsumerOfSlices takes a list of slices (and loops they are part of), tries to find the consumer of these slices (all slices are expected to be the same consumer), and then tiles the consumer into the loop nest using the TilingInterface. A more natural way of doing consumer fusion is to just start from the consumer, look for operands that are produced by the loop nest passed in as loops (presumably these loops are generated by tiling, but that is not a requirement for consumer fusion). Using the consumer you can find the slices of the operands that are accessed within the loop which you can then use to tile and fuse the consumer (using TilingInterface). This handles more naturally the case where multiple operands of the consumer come from the loop nest. The scf::tileAndFuseConsumerOfSlices was implemented as a mirror of scf::tileAndFuseProducerOfSlice. For the latter, the slice has a single producer for the source of the slice, which makes it a natural way of specifying producer fusion. But for consumers, the result might have multiple users, resulting in multiple candidates for fusion, as well as a fusion candidate using multiple results from the tiled loop nest. This means using slices (tensor.insert_slice/tensor.parallel_insert_slice) as a hook for consumer fusion turns out to be quite hard to navigate. The use of the consumer directly avoids all those pain points. In time the scf::tileAndFuseConsumerOfSlices should be deprecated in favor of scf::tileAndFuseConsumer. There is a lot of tech-debt that has accumulated in scf::tileAndFuseConsumerOfSlices that needs to be cleanedup. So while that gets cleaned up, and required functionality is moved to scf::tileAndFuseConsumer, the old path is still maintained. The test for scf::tileAndFuseConsumerUsingSlices is copied to tile-and-fuse-consumer.mlir to tile-and-fuse-consumer-using-slices.mlir. All the tests that were there in this file are now using the tileAndFuseConsumer method. The test op test.tile_and_fuse_consumer is modified to call scf::tileAndFuseConsumer, while a new op test.tile_and_fuse_consumer_of_slice is used to keep the old path tested while it is deprecated. --------- Signed-off-by: MaheshRavishankar <mahesh.ravishankar@gmail.com> | 8 个月前 | |
[mlir][Pass] Fix crash when applying a pass to an optional interface (#169262) Interfaces can be optional: whether an op implements an interface or not can depend on the state of the operation. `` // An optional code block for adding additional "classof" logic. This can // be used to better enable "optional" interfaces, where an entity only // implements the interface if some dynamic characteristic holds. // $_attr/$_op/$_type may be used to refer to an instance of the // interface instance being checked. code extraClassOf = ""; ` The current Pass::canScheduleOn(RegisteredOperationName) is insufficient. This commit adds an additional overload to inspect Operation *. This commit fixes a crash when scheduling an InterfacePass` for an optional interface on an operation that does not actually implement the interface. This is a re-upload of #168499, which was reverted. | 8 个月前 | |
[MLIR][PDL] Skip over all results in the PDL Bytecode if a Constraint/Rewrite failed (#139255) Skipping only over the first results leads to the curCodeIt pointing to the wrong location in the bytecode, causing the execution to continue with a wrong instruction after the Constraint/Rewrite. Signed-off-by: Rickert, Jonas <Jonas.Rickert@amd.com> | 1 年前 | |
[Flang][OpenMP][MLIR] Initial declare target to for variables implementation (#119589) While the infrastructure for declare target to/enter and link for variables exists in the MLIR dialect and at the Flang level, the current lowering from MLIR -> LLVM IR isn't in place, it's only in place for variables that have the link clause applied. This PR aims to extend that lowering to an initial implementation that incorporates declare target to as well, which primarily requires changes in the OpenMPToLLVMIRTranslation phase. However, a minor addition to the OpenMP dialect was required to extend the declare target enumerator to include a default None field as well. This also requires a minor change to the Flang lowering's MapInfoFinlization.cpp pass to alter the map type for descriptors to deal with cases where a variable is marked declare to. Currently, when a descriptor variable is mapped declare target to the descriptor component can become attatched, and cannot be updated, this results in issues when an unusual allocation range is specified (effectively an off-by X error). The current solution is to map the descriptor always, as we always require an up-to-date version of this data. However, this also requires an interlinked PR that adds a more intricate type of mapping of structures/record types that clang currently implements, to circumvent the overwriting of the pointer in the descriptor. 3/3 required PRs to enable declare target to mapping, this PR should pass all tests and provide an all green CI. Co-authored-by: Raghu Maddhipatla raghu.maddhipatla@amd.com | 8 个月前 | |
[mlir] Make remove-dead-values remove block and successorOperands before delete ops (#166766) Reland https://github.com/llvm/llvm-project/pull/165725, fix the Failed test by removing successor operands before delete operations. Following the deletion of cond.branch, its successor operands will subsequently be removed. | 8 个月前 | |
[NFC][Py Reformat] Reformat python files in mlir subdir This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with black. If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run git checkout --ours <yourfile> and then reformat it with black. If you run into any problems, post to discourse about it and we will try to help. RFC Thread below: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Differential Revision: https://reviews.llvm.org/D150782 | 3 年前 | |
[mlir][SCF] Add scf::tileAndFuseConsumer that tiles a consumer into a given tiled loop nest. (#167634) The existing scf::tileAndFuseConsumerOfSlices takes a list of slices (and loops they are part of), tries to find the consumer of these slices (all slices are expected to be the same consumer), and then tiles the consumer into the loop nest using the TilingInterface. A more natural way of doing consumer fusion is to just start from the consumer, look for operands that are produced by the loop nest passed in as loops (presumably these loops are generated by tiling, but that is not a requirement for consumer fusion). Using the consumer you can find the slices of the operands that are accessed within the loop which you can then use to tile and fuse the consumer (using TilingInterface). This handles more naturally the case where multiple operands of the consumer come from the loop nest. The scf::tileAndFuseConsumerOfSlices was implemented as a mirror of scf::tileAndFuseProducerOfSlice. For the latter, the slice has a single producer for the source of the slice, which makes it a natural way of specifying producer fusion. But for consumers, the result might have multiple users, resulting in multiple candidates for fusion, as well as a fusion candidate using multiple results from the tiled loop nest. This means using slices (tensor.insert_slice/tensor.parallel_insert_slice) as a hook for consumer fusion turns out to be quite hard to navigate. The use of the consumer directly avoids all those pain points. In time the scf::tileAndFuseConsumerOfSlices should be deprecated in favor of scf::tileAndFuseConsumer. There is a lot of tech-debt that has accumulated in scf::tileAndFuseConsumerOfSlices that needs to be cleanedup. So while that gets cleaned up, and required functionality is moved to scf::tileAndFuseConsumer, the old path is still maintained. The test for scf::tileAndFuseConsumerUsingSlices is copied to tile-and-fuse-consumer.mlir to tile-and-fuse-consumer-using-slices.mlir. All the tests that were there in this file are now using the tileAndFuseConsumer method. The test op test.tile_and_fuse_consumer is modified to call scf::tileAndFuseConsumer, while a new op test.tile_and_fuse_consumer_of_slice is used to keep the old path tested while it is deprecated. --------- Signed-off-by: MaheshRavishankar <mahesh.ravishankar@gmail.com> | 8 个月前 | |
| 1 年前 | ||
[mlir][lsp] Enable registering dialects based on URI. (#141331) Previously the dialects registered were fixed per LSP binary. This works as long as all the dialects of interest from the different projects across which one uses the LSP, are disjoint. This expands this to support cases where there are dialects that overlap in dialect name but usage of these are separate wrt projects. The alternative is multiple binaries and switching LSP used in editor per project (there is some extra complexity in hosted instances). This handles a simple (I believe common case) where one can determine based on path and have single binary - the cost of dynamically doing so based on path would be either keeping different registries to return or repopulating dialect & extension maps. | 1 年前 | |
[MLIR] Print more user-friendly error message when generating local reproducer and threading is enabled (#144905) | 1 年前 | |
[NFC][Py Reformat] Reformat python files in mlir subdir This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with black. If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run git checkout --ours <yourfile> and then reformat it with black. If you run into any problems, post to discourse about it and we will try to help. RFC Thread below: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Differential Revision: https://reviews.llvm.org/D150782 | 3 年前 | |
[mlir] Replace LLVM_ATTRIBUTE_UNUSED with [[maybe_unused]] (NFC) (#163703) This patch replaces LLVM_ATTRIBUTE_UNUSED with [[maybe_unused]], introduced as part of C++17. | 9 个月前 | |
[mlir] Reapply 141423 mlir-query combinators plus fix (#146156) An uninitialized variable that caused a crash (https://lab.llvm.org/buildbot/#/builders/164/builds/11004) was identified using the memory analyzer, leading to the reversion of https://github.com/llvm/llvm-project/pull/141423. This pull request reapplies the previously reverted changes and includes the fix, which has been tested locally following the steps at https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild. Note: the fix is included as part of the second commit | 1 年前 | |
[mlir-reduce] Create proper tmp test files (NFC) This commit ensures that the sh script creates temporary files with mktmp to ensure they do not collide with existing files. The previous behaviour caused sporadic permission issues on a multi-user system. Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D145054 | 3 年前 | |
[MLIR][BUILD] Fix Unicode build issue on Windows. (#112300) This issue is from https://github.com/llvm/llvm-project/pull/77668. I encountered a build issue because it used Unicode. When I built MLIR on Windows with Visual Studio 2022, I faced a build failure. --------- Co-authored-by: Harrison Hao <harrison.hao@amd.com> | 1 年前 | |
[mlir] Fix mlir-runner memref-reshape test with unranked inputs (#165902) Were using ranked before. | 8 个月前 | |
[MLIR] [Python] ir.Value is now generic in the type of the value it holds (#166148) This makes it similar to mlir::TypedValue in the MLIR C++ API and allows users to be more specific about the values they produce or accept. Co-authored-by: Maksim Levental <maksim.levental@gmail.com> | 8 个月前 | |
[mlir][emitc] Clean up EmitC tests (#152327) Changes: - Unnecessary -verify-diagnostics flags were removed from tests. - mlir/test/mlir-translate/emitc_classops.mlir was moved to mlir/test/Target/Cpp/class.mlir. - The transfrom.mlir test was renamed to form-expressions.mlir for clarity. - Test for emitc.class, emitc.field and emitc.get_field was added to mlir/test/Dialect/EmitC/ops.mlir. - wrap_emitc_func_in_class.mlir and wrap_emitc_func_in_class_noAttr.mlir were combined into wrap-func-in-class.mlir. | 11 个月前 | |
[MLIR][Python] add GetTypeID for llvm.struct_type and llvm.ptr and enable downcasting (#169383) | 8 个月前 | |
[TableGen] Do not exit in template argument check (#121636) The signature of CheckTemplateArgValues implements error handling via the bool return type, yet always returned false. The single possible error case instead used PrintFatalError, which exits the program afterward. This behavior is undesirable: It prevents any further errors from being printed and makes TableGen less usable as a library as it crashes the entire process (e.g. tblgen-lsp-server). This PR therefore fixes the issue by using Error instead and returning true if an error occurred. All callers already perform proper error handling. As llvm-tblgen exits on error, a test was also added to the LSP to ensure it exits normally despite the error. | 1 年前 | |
[MLIR][IRDL] Added IRDL to C++ Translation (#141248) This PR introduces a new tool, mlir-irdl-to-cpp, that converts IRDL to C++ definitions. The C++ definitions allow use of the IRDL-defined dialect in MLIR C++ infrastructure, enabling the use of conversion patterns with IRDL dialects for example. This PR also adds CMake utilities to easily integrate the IRDL dialects into MLIR projects. Note that most IRDL features are not supported. In general, we are only able to define simple types and operations. - The only type constraint supported is irdl.any. - Variadic operands and results are not supported. - Verifiers for the IRDL constraints are not generated. - Attributes are not supported. --------- Co-authored-by: Théo Degioanni <theo.degioanni.llvm.deluge062@simplelogin.fr> Co-authored-by: Fehr Mathieu <mathieu.fehr@gmail.com> | 1 年前 | |
Adjust "end namespace" comment in MLIR to match new agree'd coding style See D115115 and this mailing list discussion: https://lists.llvm.org/pipermail/llvm-dev/2021-December/154199.html Differential Revision: https://reviews.llvm.org/D115309 | 4 年前 | |
[MLIR][Standalone] use narrow registration instead of RegisterEverything (#160469) This PR cleans up a long-standing TODO by avoiding MLIRPythonExtension.RegisterEverything in the Standalone example and registering the necessary dialects explicitly instead. | 9 个月前 | |
[MLIR, Python] Make it easy to run tests with ASan on mac (#115524) There are two things that make running MLIR tests with ASan on a mac tedious: 1. The DYLD_INSERT_LIBRARIES environment variable needs to be set to point to libclang_rt.asan_osx_dynamic.dylib 2. Mac is wrapping Python, which means that the DYLD_INSERT_LIBRARIES environment variable is not being respected in the Python tests. The solution is to find and use a non-wrapped Python binary. With the above two changes, ASan works out of the box on mac's by setting the -DLLVM_USE_SANITIZER=Address cmake flag. I have stolen most of the code in this PR from other LLVM projects. It may be a good idea to reconcile it somewhere. | 1 年前 | |
[mlir] Add FP software implementation lowering pass: arith-to-apfloat (#167848) Reland pass and fix linker errors. --------- Co-authored-by: Maksim Levental <maksim.levental@gmail.com> | 8 个月前 | |
[mlir][Examples] Do not run test.wheel.toy by default (#163009) This test takes ~16s to execute on my machine, which is an order of magnitude longer than any other mlir test. Put the test.wheel.toy test behind a requires check for expensive checks. LLVM already has some tests enabled conditionally under expensive checks. | 9 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 9 个月前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 3 年前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 9 个月前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 11 个月前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 9 个月前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 9 个月前 |