[MLIR][GPU] Properly model step in parallel loop to gpu conversion.
authorStephan Herhut <herhut@google.com>
Mon, 24 Feb 2020 15:02:50 +0000 (16:02 +0100)
committerStephan Herhut <herhut@google.com>
Tue, 25 Feb 2020 13:22:50 +0000 (14:22 +0100)
commit5e6d7246335dc4aa0145bdbd5cea70b886a34133
tree7603ef9ec3cb2a5b87de7442a217d80a645a3589
parent305320b0057924ef78978e9df8a0e1f591990a06
[MLIR][GPU] Properly model step in parallel loop to gpu conversion.

Summary:
The original patch had TODOs to add support for step computations,
which this commit addresses. The computations are expressed using
affine expressions so that the affine canonicalizers can simplify
the full bound and index computations.

Also cleans up the code a little and exposes the pass in the
header file.

Differential Revision: https://reviews.llvm.org/D75052
mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPUPass.h
mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
mlir/lib/Conversion/LoopsToGPU/LoopsToGPUPass.cpp
mlir/test/Conversion/LoopsToGPU/parallel_loop.mlir