| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[mlir][amdgpu] Add lowerings for ScaledExtPacked816 (#168123) * Adds lowerings for amdgpy.scaled_ext_packed816 * updates verifiers | 8 个月前 | |
[mlir][amx] Optional stride for tile load and store (#159569) Adds an optional stride argument to amx.tile_load and amx.tile_store operations. The stride argument aligns ops closer to the hardware intrinsics. However, stride remains optional to preserve current op behavior. Explicit stride allows greater flexibility in terms of the base buffer shapes and allows different read and write memory patterns. When stride is not provided, it is inferred from the buffer shape as before. Operations documentation is expanded to make ops easier to use. | 9 个月前 | |
[MLIR] Apply clang-tidy fixes for readability-container-size-empty in AffineOps.cpp (NFC) | 8 个月前 | |
Add 'exact' flag to arith.shrui/shrsi/divsi/divui operations (#165923) This MR adds support for the exact flag to the arith.shrui/shrsi/divsi/divui operations. The semantics are identical to those of the LLVM dialect and the LLVM language reference. This MR also modifies the mechanism for converting arith dialect **attributes** to corresponding **properties** in the LLVM dialect. (As a specific example, the integer overflow flags nsw/nuw are **properties** in the LLVM dialect, as opposed to attributes.) Previously, attribute converter classes were required to have a specific method to support integer overflow flags: C++ template <typename SourceOp, typename TargetOp> class AttrConvertPassThrough { public: ... LLVM::IntegerOverflowFlags getOverflowFlags() const { return LLVM::IntegerOverflowFlags::none; } }; This method was required, even for arith source operations that did not use integer overflow flags (e.g. AttrConvertFastMathToLLVM). This MR modifies the interface required by arith dialect attribute converters to instead provide a (possibly NULL) properties attribute: C++ template <typename SourceOp, typename TargetOp> class AttrConvertPassThrough { public: ... Attribute getPropAttr() const { return {}; } }; For arith operations with attributes that map to LLVM dialect **properties**, the attribute converter can create a DictionaryAttr containing target properties and return that attribute from the attribute converter's getPropAttr() method. The arith attribute conversion framework will set the propertiesAttr of an OperationState, and the target operation's setPropertiesFromAttr() method will be invoked to set the properties when the target operation is created. The AttrConvertOverflowToLLVM class in this MR uses the new approach. | 8 个月前 | |
[MLIR] Apply clang-tidy fixes for readability-simplify-boolean-expr in LowerContractToNeonPatterns.cpp (NFC) | 10 个月前 | |
[MLIR] Apply clang-tidy fixes for llvm-qualified-auto in TileAllocation.cpp (NFC) | 9 个月前 | |
[MLIR] Apply clang-tidy fixes for readability-identifier-naming in LowerContractToSVEPatterns.cpp (NFC) | 10 个月前 | |
[mlir] Remove redundant declarations (NFC) (#166714) In C++17, static constexpr members are implicitly inline, so they no longer require an out-of-line definition. Identified with readability-redundant-declaration. | 8 个月前 | |
[mlir][bufferization] Refine tensor-buffer compatibility checks (#167705) Generally, to_tensor and to_buffer already perform sufficient verification. However, there are some unnecessarily strict constraints: * builtin tensor requires its buffer counterpart to always be memref * to_buffer on ranked tensor requires to always return memref These checks are assertions (i.e. preconditions), however, they actually prevent an apparently useful bufferization where builtin tensors could become custom buffers. Lift these assertions, maintaining the verification procedure unchanged, to allow builtin -> custom bufferizations at operation boundary level. | 8 个月前 | |
[mlir] Remove unused includes (NFC) (#150266) These are identified by misc-include-cleaner. I've filtered out those that break builds. Also, I'm staying away from llvm-config.h, config.h, and Compiler.h, which likely cause platform- or compiler-specific build failures. | 1 年前 | |
[mlir][CF] Add structural type conversion patterns (#165629) Add structural type conversion patterns for CF dialect ops. These patterns are similar to the SCF structural type conversion patterns. This commit adds missing functionality and is in preparation of #165180, which changes the way blocks are converted. (Only entry blocks are converted.) | 9 个月前 | |
[mlir] Remove redundant declarations (NFC) (#166714) In C++17, static constexpr members are implicitly inline, so they no longer require an out-of-line definition. Identified with readability-redundant-declaration. | 8 个月前 | |
| 8 个月前 | ||
[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 个月前 | |
| 8 个月前 | ||
[MLIR][IRDL] Support camelCase segment size attributes in IRDL verifier (#168836) Two years ago, operand_segment_sizes and result_segment_sizes were renamed to operandSegmentSizes and resultSegmentSizes (check related commits, e.g. https://github.com/llvm/llvm-project/commit/363b655920c49a4bcb0869f820ed40aac834eebd). However, the op verifiers in IRDL loading phase is still using old attributes like operand_segment_sizes and result_segment_sizes, which causes some conflict, e.g. it is not compatible with the OpView builder in MLIR python bindings (which generates camelCase segment attributes). This PR is to support to use camelCase segment size attributes in IRDL verifier. Note that support of operand_segment_sizes and result_segment_sizes is dropped. I found this issue since I'm working on a new IRDL wrapper in the MLIR python bindings. | 8 个月前 | |
[mlir] Remove unused includes (NFC) (#150266) These are identified by misc-include-cleaner. I've filtered out those that break builds. Also, I'm staying away from llvm-config.h, config.h, and Compiler.h, which likely cause platform- or compiler-specific build failures. | 1 年前 | |
[MLIR][LLVM] Support named barrier as a global variable type in llvm dialect (#169194) Enables amdgcn.named.barrier target extension type as a global variable type in MLIR. | 8 个月前 | |
[mlir][linalg] Clean up op verifiers without custom checks(NFC) (#168712) This PR removes op verifiers that do not implement any custom verification logic. | 8 个月前 | |
[mlir][NFC] update mlir/Dialect create APIs (19/n) (#149926) See https://github.com/llvm/llvm-project/pull/147168 for more info. | 1 年前 | |
[mlir][NFC] update mlir/Dialect create APIs (19/n) (#149926) See https://github.com/llvm/llvm-project/pull/147168 for more info. | 1 年前 | |
[MLIR] Add sincos fusion pass (#161413) We see performance improvements from using sincos to reuse calculations in hot loops that compute sin() and cos() of the same operand. Add a pass to identify sin() and cos() calls in the same block with the same operand and fast-math flags, and fuse them into a sincos op. Follow-up to: * #160561 * #160772 | 9 个月前 | |
[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 个月前 | |
[NFC][MLIR][NVGPU] Cleanup namespace usage (#162158) Eliminate nvgpu:: prefix in several places. | 9 个月前 | |
[mlir][acc] Adds attr to acc.present to identify default clause origin (#169114) The acc.present Op as generated by ACCImplicitData does not provide a way to differentiate between acc.present ops that are generated implicitly and the ones that are generated as result of an explicit default(present) clause in the source code. This differentiation would allow for better communication to the user on the decisions made by the compiler while managing data automatically between the host and the device. This commit adds this information as a discardable attribute on the acc.present op. | 8 个月前 | |
[openacc][openmp] Add dialect representation for acc atomic operations (#65493) The OpenACC standard specifies an atomic construct in section 2.12 (of 3.3 spec), used to ensure that a specific location is accessed or updated atomically. Four different clauses are allowed: read, write, update, or capture. If no clause appears, it is as if update is used. The OpenMP specification defines the same clauses for omp atomic. The types of expression and the clauses in the OpenACC spec match the OpenMP spec exactly. The main difference is that the OpenMP specification is a superset - it includes clauses for hint and memory order. It also allows conditional expression statements. But otherwise, the expression definition matches. Thus, for OpenACC, we refactor and reuse the OpenMP implementation as follows: * The atomic operations are duplicated in OpenACC dialect. This is preferable so that each language's semantics are precisely represented even if specs have divergence. * However, since semantics overlap, a common interface between the atomic operations is being added. The semantics for the interfaces are not generic enough to be used outside of OpenACC and OpenMP, and thus new folders were added to hold common pieces of the two dialects. * The atomic interfaces define common accessors (such as getting x or v) which match the OpenMP and OpenACC specs. It also adds common verifiers intended to be called by each dialect's operation verifier. * The OpenMP write operation was updated to use x and expr to be consistent with its other operations (that use naming based on spec). The frontend lowering necessary to generate the dialect can also be reused. This will be done in a follow up change. | 2 年前 | |
[flang][mlir] fix irreflexibility violation of strict weak ordering in #155348 (#164833) This fixes strict weak ordering checks violations from #155348 when running these two tests: mlir/test/Dialect/OpenMP/omp-offload-privatization-prepare.mlir mlir/test/Dialect/OpenMP/omp-offload-privatization-prepare-by-value.mlir Sample error: /stable/src/libcxx/include/__debug_utils/strict_weak_ordering_check.h:50: libc++ Hardening assertion !__comp(*__first + __a), *(__first + __b)) failed: Your comparator is not a valid strict-weak ordering This is because (x < x) should be false, not true, to meet the irreflexibility property. (Note that .dominates(x, x) returns true.) I'm afraid that even after this commit we can't guarantee a strict weak ordering, because we can't guarantee transitivity of equivalence by sorting with a strict dominance function. However the tests are not failing anymore, and I am not at all familiar with this code so I will leave this concern up to the original author for consideration. (Ideas without any further context: I would consider a topological sort or walking a dominator tree.) Reference on std::sort and strict weak ordering: https://danlark.org/2022/04/20/changing-stdsort-at-googles-scale-and-beyond/ | 9 个月前 | |
[mlir] Remove unused includes (NFC) (#148769) These are identified by misc-include-cleaner. I've filtered out those that break builds. Also, I'm staying away from llvm-config.h, config.h, and Compiler.h, which likely cause platform- or compiler-specific build failures. | 1 年前 | |
[mlir] Remove unused includes (NFC) (#148769) These are identified by misc-include-cleaner. I've filtered out those that break builds. Also, I'm staying away from llvm-config.h, config.h, and Compiler.h, which likely cause platform- or compiler-specific build failures. | 1 年前 | |
[mlir][ptr] Add ptr.ptr_diff operation (#157354) Thi patch introduces the ptr.ptr_diff operation for computing pointer differences. The semantics of the operation are given by: `` The ptr_diff operation computes the difference between two pointers, returning an integer or index value representing the number of bytes between them. The operation supports both scalar and shaped types with value semantics: - When both operands are scalar: produces a single difference value - When both are shaped: performs element-wise subtraction, shapes must be the same The operation also supports the following flags: - none: No flags are set. - nuw: No Unsigned Wrap, if the subtraction causes an unsigned overflow, the result is a poison value. - nsw: No Signed Wrap, if the subtraction causes a signed overflow, the result is a poison value. NOTE: The pointer difference is calculated using an integer type specified by the data layout. The final result will be sign-extended or truncated to fit the result type as necessary. ` This patch also adds translation to LLVM IR hooks for the ptr_diff op. This translation uses the ptrtoaddr builder to compute only index bits difference. Example: mlir llvm.func @ptr_diff_vector_i32(%ptrs1: vector<8x!ptr.ptr<#llvm.address_space<0>>>, %ptrs2: vector<8x!ptr.ptr<#llvm.address_space<0>>>) -> vector<8xi32> { %diffs = ptr.ptr_diff %ptrs1, %ptrs2 : vector<8x!ptr.ptr<#llvm.address_space<0>>> -> vector<8xi32> llvm.return %diffs : vector<8xi32> } Translation to LLVM IR: llvm define <8 x i32> @ptr_diff_vector_i32(<8 x ptr> %0, <8 x ptr> %1) { %3 = ptrtoint <8 x ptr> %0 to <8 x i64> %4 = ptrtoint <8 x ptr> %1 to <8 x i64> %5 = sub <8 x i64> %3, %4 %6 = trunc <8 x i64> %5 to <8 x i32> ret <8 x i32> %6 } ` --------- Co-authored-by: Mehdi Amini <joker.eph@gmail.com> | 10 个月前 | |
[MLIR] Apply clang-tidy fixes for misc-use-internal-linkage in TypeParser.cpp (NFC) | 9 个月前 | |
[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][NFC] update mlir/Dialect create APIs (20/n) (#149927) See https://github.com/llvm/llvm-project/pull/147168 for more info. | 1 年前 | |
[mlir][spirv] Add support for SwitchOp (#168713) The dialect implementation mostly copies the one of cf.switch, but aligns naming to the SPIR-V spec. | 8 个月前 | |
[MLIR] Revamp RegionBranchOpInterface (#165429) This is still somehow a WIP, we have some issues with this interface that are not trivial to solve. This patch tries to make the concepts of RegionBranchPoint and RegionSuccessor more robust and aligned with their definition: - A RegionBranchPoint is either the parent (RegionBranchOpInterface) op or a RegionBranchTerminatorOpInterface operation in a nested region. - A RegionSuccessor is either one of the nested region or the parent RegionBranchOpInterface Some new methods with reasonnable default implementation are added to help resolving the flow of values across the RegionBranchOpInterface. It is still not trivial in the current state to walk the def-use chain backward with this interface. For example when you have the 3rd block argument in the entry block of a for-loop, finding the matching operands requires to know about the hidden loop iterator block argument and where the iterargs start. The API is designed around forward-tracking of the chain unfortunately. Try to reland #161575 ; I suspect a buildbot incremental build issue. | 9 个月前 | |
[MLIR] Apply clang-tidy fixes for readability-container-size-empty in ShardOps.cpp (NFC) | 8 个月前 | |
[MLIR] Apply clang-tidy fixes for bugprone-argument-comment in SparseBufferRewriting.cpp (NFC) | 8 个月前 | |
[mlir][tensor] Drop unused AffineExpr variable (NFC) (#168651) | 8 个月前 | |
[mlir][tosa] Fix select folder when operands are broadcast (#165481) This commit addresses a crash in the dialects folder. The currently folder assumes no broadcasting of the input operand happens and therefore the folder can complain that the returned value was not the same shape as the result. For now, this commit ensures no folding happens when broadcasting is involved. In the future, folding with a broadcast could likely be supported by inserting a tosa.tile operation before returning the operand. This type of transformation is likely better suited for a canonicalization pass. This commit only aims to avoid the crash. | 8 个月前 | |
[mlir] Adopt cast function objects. NFC. (#168228) These were added in https://github.com/llvm/llvm-project/pull/165803. | 8 个月前 | |
[mlir][NFC] update mlir/Dialect create APIs (25/n) (#149932) See https://github.com/llvm/llvm-project/pull/147168 for more info. | 1 年前 | |
[mlir] Use llvm accumulate wrappers. NFCI. (#162957) Use wrappers around std::accumulate to make the code more concise and less bug-prone: https://github.com/llvm/llvm-project/pull/162129. With std::accumulate, it's the initial value that determines the accumulator type. llvm::sum_of and llvm::product_of pick the right accumulator type based on the range element type. Found some funny bugs like a local accumulate helper that calculated a sum with initial value of 1 -- we didn't hit the bug because the code was actually dead... | 9 个月前 | |
[mlir] Avoid else after return in ScalableValueBounds (NFC) (#169211) | 8 个月前 | |
[MLIR][WASM] Control flow, conversion and comparison in Wasm importer (#154674) This is the following of PR #154452. It extend Wasm binary to Wasm SSA importer with support of control flow operations, comparison operations and conversion operations. --------- Co-authored-by: Ferdinand Lemaire <ferdinand.lemaire@woven-planet.global> Co-authored-by: Jessica Paquette <jessica.paquette@woven-planet.global> Co-authored-by: Luc Forget <luc.forget@woven.toyota> | 9 个月前 | |
| 8 个月前 | ||
[mlir] Construct SmallVector with initial values (NFC) (#169239) Identified with llvm-use-ranges. | 8 个月前 | |
[MLIR][Wasm] Introduce the WasmSSA MLIR dialect (#149233) Introduce the WasmSSA dialect as discussed in https://discourse.llvm.org/t/rfc-mlir-dialect-for-webassembly/86758 and during the ODM https://discourse.llvm.org/t/mlir-open-meeting-webassembly-dialect/86928 This PR only introduces the dialect definition and interfaces, the list of operators and some operators-related helper functions (related to parsing or verification) and some tests for those. Follow-up PRs will bring the binary Webassembly importer and the lowerings to other dialects along with testing and a driver for conversion of Webassembly binaries to LLVM IR. Co-authored-by: Luc Forget <dev@alias.lforget.fr> Co-authored-by: Ferdinand Lemaire <ferdinand.lemaire@woven-planet.global> Co-authored-by: Jessica Paquette <jessica.paquette@woven-planet.global> Co-authored-by: Luc Forget <luc.forget@woven.toyota> | 11 个月前 | |
[mlir] Remove unused includes (NFC) (#148769) These are identified by misc-include-cleaner. I've filtered out those that break builds. Also, I'm staying away from llvm-config.h, config.h, and Compiler.h, which likely cause platform- or compiler-specific build failures. | 1 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 8 个月前 | ||
| 9 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 10 个月前 | ||
| 9 个月前 | ||
| 10 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 8 个月前 | ||
| 9 个月前 | ||
| 8 个月前 | ||
| 2 年前 | ||
| 9 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 9 个月前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 9 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 8 个月前 | ||
| 9 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 11 个月前 | ||
| 1 年前 |