[MLIR] Make gpu.launch implicitly capture uses of values defined above.
authorStephan Herhut <herhut@google.com>
Fri, 31 Jan 2020 09:29:29 +0000 (10:29 +0100)
committerStephan Herhut <herhut@google.com>
Mon, 3 Feb 2020 09:08:48 +0000 (10:08 +0100)
commit283b5e733d1b388e9e912e83c8c24d543e389dc1
tree1c5cdeca2ae628bc9bcb01ffa748ba288416ef24
parent2663a25fadf73e0992182caf4871161a142515ad
[MLIR] Make gpu.launch implicitly capture uses of values defined above.

Summary:
In the original design, gpu.launch required explicit capture of uses
and passing them as operands to the gpu.launch operation. This was
motivated by infrastructure restrictions rather than design. This
change lifts the requirement and removes the concept of kernel
arguments from gpu.launch. Instead, the kernel outlining
transformation now does the explicit capturing.

This is a breaking change for users of gpu.launch.

Differential Revision: https://reviews.llvm.org/D73769
15 files changed:
mlir/include/mlir/Dialect/GPU/GPUOps.td
mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
mlir/test/Conversion/LoopsToGPU/imperfect_2D.mlir
mlir/test/Conversion/LoopsToGPU/linalg_to_gpu.mlir
mlir/test/Conversion/LoopsToGPU/step_one.mlir
mlir/test/Dialect/GPU/canonicalize.mlir [deleted file]
mlir/test/Dialect/GPU/invalid.mlir
mlir/test/Dialect/GPU/ops.mlir
mlir/test/Dialect/GPU/outlining.mlir
mlir/test/mlir-cuda-runner/all-reduce-op.mlir
mlir/test/mlir-cuda-runner/all-reduce-region.mlir
mlir/test/mlir-cuda-runner/gpu-to-cubin.mlir
mlir/test/mlir-cuda-runner/shuffle.mlir