[mlir][GPU] Expose the functionality to create a GPUFuncOp from a LaunchOp
authorMaheshRavishankar <ravishankarm@google.com>
Thu, 5 Mar 2020 19:01:24 +0000 (11:01 -0800)
committerMaheshRavishankar <ravishankarm@google.com>
Thu, 5 Mar 2020 19:03:51 +0000 (11:03 -0800)
commit3f44495dfd61deddb6573c9d506a7a843b355735
tree05cae62dbda227813eee40b5a66247325fdeaf0d
parent791efb148f28e89a62413bcefd242911c6974ea6
[mlir][GPU] Expose the functionality to create a GPUFuncOp from a LaunchOp

The current setup of the GPU dialect is to model both the host and
device side codegen. For cases (like IREE) the host side modeling
might not directly fit its use case, but device-side codegen is still
valuable. First step in accessing just the device-side functionality
of the GPU dialect is to allow just creating a gpu.func operation from
a gpu.launch operation. In addition this change also "inlines"
operations into the gpu.func op at time of creation instead of this
being a later step.

Differential Revision: https://reviews.llvm.org/D75287
mlir/include/mlir/Dialect/GPU/Utils.h [new file with mode: 0644]
mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
mlir/test/Dialect/GPU/outlining.mlir