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/utils
AgeCommit message (Collapse)Author
2022-05-19[mlir][python] Add Python bindings for ml_program dialect.Stella Laurenzo
Differential Revision: https://reviews.llvm.org/D125852
2022-05-19[mlir] Add GlobalOp, GlobalLoadConstOp to ml_program.Stella Laurenzo
The approach I took was to define a dialect 'extern' attribute that a GlobalOp can take as a value to signify external linkage. I think this approach should compose well and should also work with wherever the OpaqueElements work goes in the future (since that is just another kind of attribute). I special cased the GlobalOp parser/printer for this case because it is significantly easier on the eyes. In the discussion, Jeff Niu had proposed an alternative syntax for GlobalOp that I ended up not taking. I did try to implement it but a) I don't think it made anything easier to read in the common case, and b) it made the parsing/printing logic a lot more complicated (I think I would need a completely custom parser/printer to do it well). Please have a look at the common cases where the global type and initial value type match: I don't think how I have it is too bad. The less common cases seem ok to me. I chose to only implement the direct, constant load op since that is non side effecting and there was still discussion pending on that. Differential Revision: https://reviews.llvm.org/D124318
2022-05-18[mlir][complex] Add pow/sqrt/tanh ops and lowering to libmBenjamin Kramer
Lowering through libm gives us a baseline version, even though it's not going to be particularly fast. This is similar to what we do for some math dialect ops. Differential Revision: https://reviews.llvm.org/D125550
2022-05-16[mlir][sparse] introduce complex type to sparse tensor supportAart Bik
This is the first implementation of complex (f64 and f32) support in the sparse compiler, with complex add/mul as first operations. Note that various features are still TBD, such as other ops, and reading in complex values from file. Also, note that the std::complex<float> had a bit of an ABI issue when passed as single argument. It is still TBD if better solutions are possible. Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D125596
2022-05-14[bazel] Port ae8bbc43f470Benjamin Kramer
2022-05-13[mlir] Add TensorToLinalgPassTres Popp
This pass is to handle computationally complex operations like tensor.pad which are not simply lowered to the exact same operation in the memref dialect. Differential Revision: https://reviews.llvm.org/D125384
2022-05-12[libc] fix uint includes and libc bazelMichael Jones
This patch fixes the includes for the new UInt class so that the api test now passes, additionally it fixes the bazel files to account for the new dependencies. Differential Revision: https://reviews.llvm.org/D125490
2022-05-12[mlir][vector] Add lowering pattern for vector.warp_execute_on_lane_0 opThomas Raoux
Add lowering of the vector.warp_execute_on_lane_0 into scf.if plus memory transfer for the operands and yield values. This also add an integration test running on GPU warp. The same tests can be later re-used with different comment lines to tests distribution transformations. This is mostly from @springerm contribution. Differential Revision: https://reviews.llvm.org/D125430
2022-05-12[mlir][linalg] Add lowering of named ops on complex numbersBenjamin Kramer
This lets linalg.dot and friends lower to a complex muladd using ops from the complex dialect. Differential Revision: https://reviews.llvm.org/D125461
2022-05-12[bazel] Add support for configuring the bazel build for PPCBenjamin Kramer
TF already carries a patch for this.
2022-05-11[Bazel] Add support for s390x build targetVibhuti Sawant
While executing the test suite for Tensorflow(v2.8.0), we encountered multiple TC failures with the below error ``` 'z14' is not a recognized processor for this target ``` This patch adds the s390x target to the build target list. It fixes TC failures in multiple modules of Tensorflow on s390x arch. It is also tested to have no effect on x86 machines. Reviewed By: GMNGeoffrey Differential Revision: https://reviews.llvm.org/D125096
2022-05-11[mlir][gpu] Move async copy ops to NVGPU and add caching hintsThomas Raoux
Move async copy operations to NVGPU as they only exist on NV target and are designed to match ptx semantic. This allows us to also add more fine grain caching hint attribute to the op. Add hint to bypass L1 and hook it up to NVVM op. Differential Revision: https://reviews.llvm.org/D125244
2022-05-10[mlir][AMDGPU] Add AMDGPU conversion patterns to ConvertGPUToROCDLKrzysztof Drewniak
This ensures that attributes such as the index bitwidth propagate correctly to the AMDGPUToROCDL patterns. Differential Revision: https://reviews.llvm.org/D125320
2022-05-10[MLIR][AMDGPU] Add AMDGPU dialect, wrappers around raw buffer intrinsicsKrzysztof Drewniak
By analogy with the NVGPU dialect, introduce an AMDGPU dialect for AMD-specific intrinsic wrappers. The dialect initially includes wrappers around the raw buffer intrinsics. On AMD GPUs, a memref can be converted to a "buffer descriptor" that allows more precise control of memory access, such as by allowing for out of bounds loads/stores to be replaced by 0/ignored without adding additional conditional logic, which is important for performance. The repository currently contains a limited conversion from transfer_read/transfer_write to Mubuf intrinsics, which are an older, deprecated intrinsic for the same functionality. The new amdgpu.raw_buffer_* ops allow these operations to be used explicitly and for including metadata such as whether the target chipset is an RDNA chip or not (which impacts the interpretation of some bits in the buffer descriptor), while still maintaining an MLIR-like interface. (This change also exposes the floating-point atomic add intrinsic.) Reviewed By: ThomasRaoux Differential Revision: https://reviews.llvm.org/D122765
2022-05-04[bazel] Fix the build after 2c3326608460Benjamin Kramer
2022-05-03[bazel] Add test targets for dataflow frameworkEric Li
Differential Revision: https://reviews.llvm.org/D124819
2022-04-29[mlir][linalg][transform] Add TileOp to transform dialectMatthias Springer
This commit adds a tiling op to the transform dialect as an external op. Differential Revision: https://reviews.llvm.org/D124661
2022-04-28[bazel] Port 92a836da0759Benjamin Kramer
2022-04-28[bazel] Port 84fe39a45b73Benjamin Kramer
2022-04-27[mlir][bazel] Add suport for PDLL tests.Stephan Herhut
Differential Revision: https://reviews.llvm.org/D124515
2022-04-25[mlir][Bazel] Add missing dependencies.Adrian Kuegel
When building with layering_check enabled, there needs to be a dependency for each header include.
2022-04-23[Bazel] Add more mlir dependencies after D124298Fangrui Song
The Bazel layering_check feature compiles libraries with `-fmodule-name=X -fmodules-strict-decluse` which require #include to be in deps.
2022-04-23[Bazel] Make mlir:BufferizationDialect depend on mlir:ArithmeticDialect ↵Fangrui Song
after D124298
2022-04-23[mlir] use side effects in the Transform dialectAlex Zinenko
Currently, the sequence of Transform dialect operations only supports a single use of each operand (verified by the `transform.sequence` operation). This was originally motivated by the need to guard against accessing a payload IR operation associated with a transform IR value after this operation has likely been rewritten by a transformation. However, not all Transform dialect operations rewrite payload IR, in particular the "navigation" operation such as `transform.pdl_match` do not. Introduce memory effects to the Transform dialect operations to describe their effect on the payload IR and the mapping between payload IR opreations and transform IR values. Use these effects to replace the single-use rule, allowing repeated reads and disallowing use-after-free, where operations with the "free" effect are considered to "consume" the transform IR value and rewrite the corresponding payload IR operations). As an additional improvement, this enables code motion transformation on the transform IR itself. Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D124181
2022-04-22[Bazel] Make mlir/test:TestShapeDialect depend on mlir:FuncDialectFangrui Song
2022-04-22[mlir] Add shape.funcJacques Pienaar
Add shape func op for use (primarily) in shape function_library op. Allows setting default dialect for some simpler authoring. This is a minimal version of the ops needed. Differential Revision: https://reviews.llvm.org/D124055
2022-04-22[mlir][bufferization] Move ModuleBufferization to bufferization dialectMatthias Springer
* Move Module Bufferization to the bufferization dialect. The implementation is split into `OneShotModuleBufferize.cpp` and `FuncBufferizableOpInterfaceImpl.cpp`, so that the external model implementation can be easily moved to the func dialect in the future. * Split and clean up test cases. A few test cases are still remaining in Linalg and will be updated separately. * `linalg.inplaceable` is renamed to `bufferization.writable` to accurately reflect its current usage. * Attributes and their verifiers are moved from the Linalg dialect to the Bufferization dialect. * Expand documentation. * Add a new flag to One-Shot Bufferize to allow for function boundary bufferization. Differential Revision: https://reviews.llvm.org/D122229
2022-04-21[bazel] try to adapt a7691dee2d3c0ea3f9f4d1, againSam McCall
2022-04-21[bazel] try to adapt a7691dee2d3c0ea3f9f4d1Sam McCall
2022-04-21[mlir] Connect Transform dialect to PDLAlex Zinenko
This introduces a pair of ops to the Transform dialect that connect it to PDL patterns. Transform dialect relies on PDL for matching the Payload IR ops that are about to be transformed. For this purpose, it provides a container op for patterns, a "pdl_match" op and transform interface implementations that call into the pattern matching infrastructure. To enable the caching of compiled patterns, this also provides the extension mechanism for TransformState. Extensions allow one to store additional information in the TransformState and thus communicate it between different Transform dialect operations when they are applied. They can be added and removed when applying transform ops. An extension containing a symbol table in which the pattern names are resolved and a pattern compilation cache is introduced as the first client. Depends On D123664 Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D124007
2022-04-21[Pipelines] Remove Legacy Passes in CoroutinesChuanqi Xu
The legacy passes are deprecated now and would be removed in near future. This patch tries to remove legacy passes in coroutines. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D123918
2022-04-20[bazel] Port f26c41e8dd28Benjamin Kramer
2022-04-19[mlir][transform] Introduce transform.sequence opAlex Zinenko
Sequence is an important transform combination primitive that just indicates transform ops being applied in a row. The simplest version requires fails immediately if any transformation in the sequence fails. Introducing this operation allows one to start placing transform IR within other IR. Depends On D123135 Reviewed By: Mogball, rriddle Differential Revision: https://reviews.llvm.org/D123664
2022-04-16[mlir] Refactor LICM into a utilityMogball
LICM is refactored into a utility that is application on any region. The implementation is moved to Transform/Utils.
2022-04-16Revert "[mlir] Refactor LICM into a utility"Stella Stamenova
This reverts commit 3131f808243abe3746280e016ab9459c14d9e53b. This commit broke the Windows mlir bot: https://lab.llvm.org/buildbot/#/builders/13/builds/19745
2022-04-16[mlir] Refactor LICM into a utilityMogball
LICM is refactored into a utility that is application on any region. The implementation is moved to Transform/Utils.
2022-04-15[mlir] Fix BUILD issues and dependencies.rdzhabarov
Differential Revision: https://reviews.llvm.org/D123868
2022-04-15Adjust Bazel BUILD files for 6d45558c1Dmitri Gribenko
2022-04-15[mlir] Update bazel file after adding nvgpu to nvvm conversionThomas Raoux
2022-04-15[mlir][vector] Add operations used for Vector distributionThomas Raoux
Add vector op warp_execute_on_lane_0 that will be used to do incremental vector distribution in order to target warp level vector programming for architectures with GPU-like SIMT programming model. The idea behing the op is discussed further on discourse: https://discourse.llvm.org/t/vector-vector-distribution-large-vector-to-small-vector/1983/23 Differential Revision: https://reviews.llvm.org/D123703
2022-04-14[mlir][nvgpu] Add NVGPU dialect (architectural specific gpu dialect)Thomas Raoux
This introduce a new dialect for vendro specific ptx operations. This also adds the first operation ldmatrix as an example. More operations will be added in follow up patches. This new dialect is meant to be a bridge between GPU and Vector dialectis and NVVM dialect. This is based on the RFC proposed here: https://discourse.llvm.org/t/rfc-add-nv-gpu-dialect-hw-specific-extension-of-gpu-dialect-for-nvidia-gpus/61466/8 Differential Revision: https://reviews.llvm.org/D123266
2022-04-14[mlir] Introduce Transform dialectAlex Zinenko
This dialect provides operations that can be used to control transformation of the IR using a different portion of the IR. It refers to the IR being transformed as payload IR, and to the IR guiding the transformation as transform IR. The main use case for this dialect is orchestrating fine-grain transformations on individual operations or sets thereof. For example, it may involve finding loop-like operations with specific properties (e.g., large size) in the payload IR, applying loop tiling to those and only those operations, and then applying loop unrolling to the inner loops produced by the previous transformations. As such, it is not intended as a replacement for the pass infrastructure, nor for the pattern rewriting infrastructure. In the most common case, the transform IR will be processed and applied to payload IR by a pass. Transformations expressed by the transform dialect may be implemented using the pattern infrastructure or any other relevant MLIR component. This dialect is designed to be extensible, that is, clients of this dialect are allowed to inject additional operations into this dialect using the newly introduced in this patch `TransformDialectExtension` mechanism. This allows the dialect to avoid a dependency on the implementation of the transformation as well as to avoid introducing dialect-specific transform dialects. See https://discourse.llvm.org/t/rfc-interfaces-and-dialects-for-precise-ir-transformation-control/60927. Reviewed By: nicolasvasilache, Mogball, rriddle Differential Revision: https://reviews.llvm.org/D123135
2022-04-14[mlir] Split intrinsics out of LLVMOps.tdAlex Zinenko
Move the operations that correspond to LLVM IR intrinsics in a separate .td file. This makes it easier to maintain the intrinsics and decreases the compile time of LLVMDialect.cpp by ~25%. Depends On D123310 Reviewed By: wsmoses, jacquesguan Differential Revision: https://reviews.llvm.org/D123315
2022-04-14[mlir] Introduce ml_program dialect.Stella Laurenzo
Differential Revision: https://reviews.llvm.org/D120203
2022-04-14[bazel] Set CLANG_ENABLE_OPAQUE_POINTERS_INTERNAL to 1Arthur Eubanks
Matches official cmake build.
2022-04-12Update the Bazel build files for "[mlir][Math] Replace some constant ..."Dmitri Gribenko
2022-04-12Fix BUILD dependency for ExecutionEngineUtilsrdzhabarov
Differential Revision: https://reviews.llvm.org/D123570
2022-04-12[mlir] Add msan memory unpoisoning macros to mlir ExecutionEngineEugene Zhulenev
Adding annotations on as-needed bases, currently only for memrefCopy, but in general all C API functions that take pointers to memory allocated/initialized inside the jit-compiled code must be annotated, to be able to run with msan. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D123557
2022-04-12Fixing BUILD dependency on the DialectBase.rdzhabarov
Differential Revision: https://reviews.llvm.org/D123558
2022-04-12[CMake][gn][Bazel] Remove HAVE_PTHREAD_GETSPECIFICFangrui Song
The only user was removed by d351f54a076edf24c2a2bfda7cc7e3313ee3eecf.