[MLIR][DISC] Revise ParallelLoopTilingPass with inbound_check mode
authortashuang.zk <tashuang.zk@alibaba-inc.com>
Mon, 16 Aug 2021 11:41:55 +0000 (13:41 +0200)
committerStephan Herhut <herhut@google.com>
Mon, 16 Aug 2021 12:02:53 +0000 (14:02 +0200)
commit2d45e332ba321a22996a1584af26d568b375b674
treec372a1a0ce0b0867700bdb039fa9c3e108aac932
parenta7dc71130ffb41195e2efac2221692875144c18f
[MLIR][DISC] Revise ParallelLoopTilingPass with inbound_check mode

Expand ParallelLoopTilingPass with an inbound_check mode.

In default mode, the upper bound of the inner loop is from the min op; in
inbound_check mode, the upper bound of the inner loop is the step of the outer
loop and an additional inbound check will be emitted inside of the inner loop.

This was 'FIXME' in the original codes and a typical usage is for GPU backends,
thus the outer loop and inner loop can be mapped to blocks/threads in seperate.

Differential Revision: https://reviews.llvm.org/D105455
mlir/include/mlir/Dialect/SCF/Passes.h
mlir/include/mlir/Dialect/SCF/Passes.td
mlir/include/mlir/Dialect/SCF/Transforms.h
mlir/lib/Dialect/SCF/Transforms/ParallelLoopTiling.cpp
mlir/test/Dialect/SCF/parallel-loop-tiling-inbound-check.mlir [new file with mode: 0644]