[all-commits] [llvm/llvm-project] cdb6f0: [mlir][gpu] Refactor ConvertGpuLaunchFuncToCudaCal...

Wen-Heng (Jack) Chung via All-commits all-commits at lists.llvm.org
Wed May 20 14:12:15 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: cdb6f05e2d5f0132956020e6b4990af0206c066f
      https://github.com/llvm/llvm-project/commit/cdb6f05e2d5f0132956020e6b4990af0206c066f
  Author: Wen-Heng (Jack) Chung <whchung at gmail.com>
  Date:   2020-05-20 (Wed, 20 May 2020)

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

  Log Message:
  -----------
  [mlir][gpu] Refactor ConvertGpuLaunchFuncToCudaCalls pass.

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.
- Rename runtime wrapper APIs be platform-neutral.
- Let GPU binary annotation attribute be specifiable as a PassOption.
- Naming changes within the implementation and tests.

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

Differential Revision: https://reviews.llvm.org/D80167




More information about the All-commits mailing list