2020-03-21 05:18:47 +08:00
|
|
|
add_subdirectory(Affine)
|
2020-03-21 02:05:49 +08:00
|
|
|
add_subdirectory(AVX512)
|
2019-07-25 15:40:48 +08:00
|
|
|
add_subdirectory(GPU)
|
2019-08-20 08:11:12 +08:00
|
|
|
add_subdirectory(Linalg)
|
2019-08-20 02:00:47 +08:00
|
|
|
add_subdirectory(LLVMIR)
|
2020-08-12 23:48:24 +08:00
|
|
|
add_subdirectory(OpenACC)
|
[MLIR] Add OpenMP dialect with barrier operation
Summary:
Barrier is a simple operation that takes no arguments and returns
nothing, but implies a side effect (synchronization of all threads)
Reviewers: jdoerfert
Subscribers: mgorny, guansong, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72400
2020-01-29 19:31:25 +08:00
|
|
|
add_subdirectory(OpenMP)
|
[mlir] Add a new "Pattern Descriptor Language" (PDL) dialect.
PDL presents a high level abstraction for the rewrite pattern infrastructure available in MLIR. This abstraction allows for representing patterns transforming MLIR, as MLIR. This allows for applying all of the benefits that the general MLIR infrastructure provides, to the infrastructure itself. This means that pattern matching can be more easily verified for correctness, targeted by frontends, and optimized.
PDL abstracts over various different aspects of patterns and core MLIR data structures. Patterns are specified via a `pdl.pattern` operation. These operations contain a region body for the "matcher" code, and terminate with a `pdl.rewrite` that either dispatches to an external rewriter or contains a region for the rewrite specified via `pdl`. The types of values in `pdl` are handle types to MLIR C++ types, with `!pdl.attribute`, `!pdl.operation`, and `!pdl.type` directly mapping to `mlir::Attribute`, `mlir::Operation*`, and `mlir::Value` respectively.
An example pattern is shown below:
```mlir
// pdl.pattern contains metadata similarly to a `RewritePattern`.
pdl.pattern : benefit(1) {
// External input operand values are specified via `pdl.input` operations.
// Result types are constrainted via `pdl.type` operations.
%resultType = pdl.type
%inputOperand = pdl.input
%root, %results = pdl.operation "foo.op"(%inputOperand) -> %resultType
pdl.rewrite(%root) {
pdl.replace %root with (%inputOperand)
}
}
```
This is a culmination of the work originally discussed here: https://groups.google.com/a/tensorflow.org/g/mlir/c/j_bn74ByxlQ
Differential Revision: https://reviews.llvm.org/D84578
2020-08-20 03:57:45 +08:00
|
|
|
add_subdirectory(PDL)
|
2020-03-18 05:56:52 +08:00
|
|
|
add_subdirectory(Quant)
|
2020-05-11 21:00:48 +08:00
|
|
|
add_subdirectory(SCF)
|
2019-08-20 02:00:47 +08:00
|
|
|
add_subdirectory(SDBM)
|
2020-03-18 04:34:52 +08:00
|
|
|
add_subdirectory(Shape)
|
2019-07-16 20:06:57 +08:00
|
|
|
add_subdirectory(SPIRV)
|
2019-08-20 02:00:47 +08:00
|
|
|
add_subdirectory(StandardOps)
|
2020-03-18 06:24:27 +08:00
|
|
|
add_subdirectory(Vector)
|
2019-05-15 02:03:55 +08:00
|
|
|
|
2020-02-12 17:03:40 +08:00
|
|
|
set(LLVM_OPTIONAL_SOURCES
|
|
|
|
Traits.cpp
|
|
|
|
)
|
|
|
|
|
2020-02-09 11:27:54 +08:00
|
|
|
add_mlir_library(MLIRDialect
|
2019-03-30 13:10:12 +08:00
|
|
|
Traits.cpp
|
|
|
|
|
|
|
|
ADDITIONAL_HEADER_DIRS
|
|
|
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect
|
2020-05-05 03:41:43 +08:00
|
|
|
|
|
|
|
LINK_LIBS PUBLIC
|
2020-03-06 03:49:42 +08:00
|
|
|
MLIRIR
|
|
|
|
)
|