[PATCH] D80167: [mlir][gpu] Refactor ConvertGpuLaunchFuncToCudaCalls pass.

Wen-Heng (Jack) Chung via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 18 15:46:35 PDT 2020


whchung created this revision.
whchung added a project: MLIR.
Herald added subscribers: llvm-commits, jurahul, Kayjukh, frgossen, grosul1, Joonsoo, stephenneuendorffer, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, csigg, nicolasvasilache, antiagainst, shauheen, jpienaar, rriddle, mehdi_amini, yaxunl, mgorny.
Herald added a reviewer: herhut.
Herald added a project: LLVM.

Due to similar APIs between CUDA and ROCm (HIP),
ConvertGpuLaunchFuncToCudaCalls pass could be used on both platforms with some
refactoring.

In this commit:

- Migrate ConvertLaunchFuncToCudaCalls from GPUToCUDA to GPUCommon, and rename.
- Change CUDA-specific runtime wrapper APIs be specifiable as PassOptions.
- Naming changes within the implementation and tests.

Subsequent patches would introduce ROCm-specific tests and runtime wrapper
APIs.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80167

Files:
  mlir/include/mlir/Conversion/GPUCommon/GPUCommonPass.h
  mlir/include/mlir/Conversion/GPUToCUDA/GPUToCUDAPass.h
  mlir/include/mlir/Conversion/Passes.td
  mlir/include/mlir/InitAllPasses.h
  mlir/lib/Conversion/CMakeLists.txt
  mlir/lib/Conversion/GPUCommon/CMakeLists.txt
  mlir/lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp
  mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt
  mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
  mlir/test/Conversion/GPUCommon/lower-launch-func-to-gpu-runtime-calls.mlir
  mlir/test/Conversion/GPUToCUDA/lower-launch-func-to-cuda.mlir
  mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80167.264738.patch
Type: text/x-patch
Size: 26988 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200518/67514758/attachment.bin>


More information about the llvm-commits mailing list