llvm-project/mlir
Lei Zhang 0edb412773 [mlir][linalg] Add control to pad-slice swap pattern
The pad-slice swap pattern generates `scf.if` and `tensor.generate`
to guard against zero-sized slices if it cannot prove the slice is
always non-zero. This is safe but quite conservative. It can be
unnecessary for cases where we know by problem definition such cases
does not exist, even if with dynamic shaped ops or unknown tile/slice
sizes, e.g., convolution padding size = 1 with kernel dim size = 3.

So this commit introduces a control to the pattern to specify
whether to generate the if constructs to handle such cases better,
given that once the if constructs is materialized, it's very hard
to analyze and simplify.

Reviewed By: mravishankar

Differential Revision: https://reviews.llvm.org/D117017
2022-02-16 11:19:35 -05:00
..
benchmark/python [mlir] Use sparse-compiler pass in sparse benchmark 2022-02-09 20:16:47 +00:00
cmake/modules [mlir] Do not use an empty source file when building aggregate libraries. 2022-02-05 23:06:28 -08:00
docs [mlir][ods] Default-valued parameters in attribute or type defs 2022-02-15 19:02:11 +00:00
examples [mlir] Update Toy operations to use the `hasCustomAssemblyFormat` field 2022-02-07 19:03:58 -08:00
include [mlir][linalg] Add control to pad-slice swap pattern 2022-02-16 11:19:35 -05:00
lib [mlir][linalg] Add control to pad-slice swap pattern 2022-02-16 11:19:35 -05:00
python [mlir][OpDSL] Restructure comprehension.py (NFC). 2022-02-14 12:56:01 +00:00
test [mlir][MemRef] Lower memref.copy with an offset to memcpy 2022-02-16 17:18:31 +01:00
tools [mlir][ods] NFC fix compilation error on clang-8 2022-02-15 19:41:16 +00:00
unittests [MLIR][Presburger] normalizeDivisionByGCD: fix bug when constant term is negative 2022-02-11 17:02:52 +05:30
utils [mlir][spirv] Add OpenCL fma op and lowering 2022-02-15 11:28:20 +03:00
.clang-format
.clang-tidy Enable readability-redundant-smartptr-get in MLIR local clang-tidy config 2022-01-08 20:07:11 +00:00
CMakeLists.txt [mlir] Set up boilerplate build for MLIR benchmarks 2022-01-27 21:38:15 +00:00
LICENSE.TXT
README.md

README.md

Multi-Level Intermediate Representation

See https://mlir.llvm.org/ for more information.