| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Revert rGfae7b98c221b5b28797f7b56b656b6b819d99f27 "[Support] Change SetVector's default template parameter to SmallVector<*, 0>" This is failing on Windows MSVC builds: llvm\unittests\Support\ThreadPool.cpp(380): error C2440: 'return': cannot convert from 'Vector' to 'std::vector<llvm::BitVector,std::allocator<llvm::BitVector>>' with [ Vector=llvm::SmallVector<llvm::BitVector,0> ] | 2 年前 | |
[mlir] Improve syntax of distinct[n]<unit> In cases where memory is of less of a concern (e.g. small attributes where all instances have to be distinct by definition), using DistinctAttr with a unit attribute is a useful and conscious way of generating deterministic unique IDs. The syntax as is however, makes them less useful to use, as it 1) always prints <unit> at the back and 2) always aliases them leading to not very useful #distinct = distinct[n]<unit> lines in the printer output. This patch fixes that by special casing UnitAttr to simply elide the unit attribute in the back and not printing it as alias in that case. Differential Revision: https://reviews.llvm.org/D155162 | 2 年前 | |
[backport][mlir] Add Python bindings for DenseResourceElementsAttr. (#66319) Only construction and type casting are implemented. The method to create is explicitly named "unsafe" and the documentation calls out what the caller is responsible for. There really isn't a better way to do this and retain the power-user feature this represents. originally by: Stella Laurenzo reference: https://github.com/llvm/llvm-project/commit/f66cd9e9556a53142a26a5c21a72e21f1579 | 9 个月前 | |
[MLIR][Bytecode] Add missing field initializer in constructor initializer list Leaving this field unitialized could led to crashes when it'll diverge from the IRNumbering phase. Differential Revision: https://reviews.llvm.org/D156965 | 2 年前 | |
[backport][mlir] Add Python bindings for DenseResourceElementsAttr. (#66319) Only construction and type casting are implemented. The method to create is explicitly named "unsafe" and the documentation calls out what the caller is responsible for. There really isn't a better way to do this and retain the power-user feature this represents. originally by: Stella Laurenzo reference: https://github.com/llvm/llvm-project/commit/f66cd9e9556a53142a26a5c21a72e21f1579 | 9 个月前 | |
[mlir][gpu] NFC - Fail gracefully when type conversion fails instead of crashing | 2 年前 | |
[mlir] Move casting calls from methods to function calls The MLIR classes Type/Attribute/Operation/Op/Value support cast/dyn_cast/isa/dyn_cast_or_null functionality through llvm's doCast functionality in addition to defining methods with the same name. This change begins the migration of uses of the method to the corresponding function call as has been decided as more consistent. Note that there still exist classes that only define methods directly, such as AffineExpr, and this does not include work currently to support a functional cast/isa call. Context: - https://mlir.llvm.org/deprecation/ at "Use the free function variants for dyn_cast/cast/isa/…" - Original discussion at https://discourse.llvm.org/t/preferred-casting-style-going-forward/68443 Implementation: This patch updates all remaining uses of the deprecated functionality in mlir/. This was done with clang-tidy as described below and further modifications to GPUBase.td and OpenMPOpsInterfaces.td. Steps are described per line, as comments are removed by git: 0. Retrieve the change from the following to build clang-tidy with an additional check: main...tpopp:llvm-project:tidy-cast-check 1. Build clang-tidy 2. Run clang-tidy over your entire codebase while disabling all checks and enabling the one relevant one. Run on all header files also. 3. Delete .inc files that were also modified, so the next build rebuilds them to a pure state. ninja -C $BUILD_DIR clang-tidy run-clang-tidy -clang-tidy-binary=$BUILD_DIR/bin/clang-tidy -checks='-*,misc-cast-functions'\ -header-filter=mlir/ mlir/* -fix rm -rf $BUILD_DIR/tools/mlir/**/*.inc Differential Revision: https://reviews.llvm.org/D151542 | 3 年前 | |
[mlir] Add pass to add comdat to all linkonce functions (#65270) This adds a new pass to add an Any comdat to each linkonce and linkonce_odr function in the LLVM dialect. These comdats are necessary on Windows to allow the default system linker to link binaries containing these functions. (cherry picked from commit a6857156df9a73720fbd9633067d1a61c32dd74e) | 2 年前 | |
[mlir] Avoid including <alloca.h> on DragonFly (cherry picked from commit a157a82b1e7a8d4be34cc862db4b42fa9db363d0) | 2 年前 | |
[mlir] Fix infinite recursion in alias initializer The alias initializer keeps a list of child indices around. When an alias is then marked as non-deferrable, all children are also marked non-deferrable. This is currently done naively which leads to an infinite recursion if using mutable types or attributes containing a cycle. This patch fixes this by adding an early return if the alias is already marked non-deferrable. Since this function is the only way to mark an alias as non-deferrable, it is guaranteed that if it is marked non-deferrable, all its children are as well, and it is not required to walk all the children. This incidentally makes the non-deferrable marking also O(n) instead of O(n^2) (although not performance sensitive obviously). Differential Revision: https://reviews.llvm.org/D158932 | 2 年前 | |
[ODS] Extra Concrete Declarations and Definitions under Traits Support extra concrete class declarations and definitions under NativeTrait that get injected into the class that specifies the trait. Extra declarations and definitions can be passed in as template arguments for NativeOpTraitNativeAttrTrait and NativeTypeTrait. Usage examples of this feature include: - Creating a wrapper Trait for authoring inferReturnTypes with the OpAdaptor by specifying necessary Op specific declarations and definitions directly in the trait - Refactoring the InferTensorType trait Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D154731 | 2 年前 | |
[mlir][python] Add generic operation parse APIs Currently the bindings only allow for parsing IR with a top-level builtin.module op, since the parse APIs insert an implicit module op. This change adds Operation.parse, which returns whatever top-level op is actually in the source. To simplify parsing of specific operations, OpView.parse is also added, which handles the error checking for OpView subclasses. Reviewed By: ftynse, stellaraccident Differential Revision: https://reviews.llvm.org/D143352 | 3 年前 | |
Fix MSAN error: use of unitialized value when hashing the MLIR pass manager (NFC) | 2 年前 | |
[mlir] GreedyPatternRewriteDriver: Move strict mode to GreedyPatternRewriteDriver strictMode is moved to GreedyRewriteConfig to simplify the API and state of rewriter classes. The region-based GreedyPatternRewriteDriver now also supports strict mode. MultiOpPatternRewriteDriver becomes simpler: fewer method must be overridden. Differential Revision: https://reviews.llvm.org/D142623 | 3 年前 | |
Finish renaming getOperandSegmentSizeAttr() from operand_segment_sizes to operandSegmentSizes This renaming started with the native ODS support for properties, this is completing it. A mass automated textual rename seems safe for most codebases. Drop also the ods prefix to keep the accessors the same as they were before this change: properties.odsOperandSegmentSizes reverts back to: properties.operandSegementSizes The ODS prefix was creating divergence between all the places and make it harder to be consistent. Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D157173 | 2 年前 | |
Convert MLIR IndentedOstream to header only. This class has been causing me no end of grief for a long time, and the way it is used by mlir-tblgen is technically an ODR violation in certain situations. Due to the way that the build is layered, it is important that the MLIR tablegen libraries only depend on the LLVM tablegen libraries, not on anything else (like MLIRSupport). It has to be this way because these libraries/binaries are special and must pre-exist the full shared libraries. Therefore, the dependency chain must be clean (and static). At some point, someone pulled out a separate build target for just IndendedOstream in an attempt to satisfy the constraint. But because it is weird in different ways, this target was never installed properly as part of distributions, etc -- this causes problems for downstreams seeking to build a tblggen binary that doesn't itself have ODR/shared library problems. I was attempting to fix the distribution stuff but just opted to collapse this into a header-only library and not try to solve this with build layering. I think this is the safest and the least bad thing for such a dep. This also makes for a clean comment that actually explains the constraint (which I was having trouble verbalizing with the weird subset dependency). Differential Revision: https://reviews.llvm.org/D153393 | 2 年前 | |
Update ODS variadic segments "magic" attributes to use native Properties The operand_segment_sizes and result_segment_sizes Attributes are now inlined in the operation as native propertie. We continue to support building an Attribute on the fly for getAttr("operand_segment_sizes") and setting the property from an attribute with setAttr("operand_segment_sizes", attr). A new bytecode version is introduced to support backward compatibility and backdeployments. Differential Revision: https://reviews.llvm.org/D155919 | 2 年前 | |
[mlir][llvm] Fix export of 64-bit integer function attributes The allocsize attribute is weird because it packs two 32-bit values into a 64-bit value. It also turns out that the passthrough attribute exporter was using int, which is incorrectly handling 64-bit integers. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D156574 | 2 年前 | |
[mlir-lsp] Guard writing output to JSONTransport with mutex This allows for users of the lsp transport libraries to process replies in parallel, without overlapping/clobbering the output. Differential Revision: https://reviews.llvm.org/D156295 | 2 年前 | |
Fix canonicalizer to copy the entire GreedyRewriteConfig instead of selected fields It is surprising for the user that only some fields were honored. Also make the FrozenRewritePatternSet a shared_ptr<const T>. Fixes #64543 Differential Revision: https://reviews.llvm.org/D157469 | 2 年前 | |
Rename DebugAction to tracing::Action and move related code from lib/Support to lib/IR and lib/Debug This is a preparation for adding support for more infrastructure around the concept of Action and make tracing Action more of a first class concept. The doc will be updated later in a subsequent revision after the changes are completed. Action belongs to IR because of circular dependency: Actions are dispatched through the MLIRContext but Action will learn to encapsulate IR construct. Differential Revision: https://reviews.llvm.org/D144809 | 3 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 年前 | ||
| 2 年前 | ||
| 9 个月前 | ||
| 2 年前 | ||
| 9 个月前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 |