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

Wen-Heng (Jack) Chung via All-commits all-commits at lists.llvm.org
Thu May 21 07:03:13 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2cbbc266ec1e489175ee988794c3880075c13d00
      https://github.com/llvm/llvm-project/commit/2cbbc266ec1e489175ee988794c3880075c13d00
  Author: Wen-Heng (Jack) Chung <whchung at gmail.com>
  Date:   2020-05-21 (Thu, 21 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