[all-commits] [llvm/llvm-project] 061fb8: [mlir][gpu][mlir-cuda-runner] Refactor ConvertKern...

Wen-Heng (Jack) Chung via All-commits all-commits at lists.llvm.org
Thu May 28 07:09:22 PDT 2020


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

  Changed paths:
    M mlir/CMakeLists.txt
    M mlir/include/mlir/Conversion/GPUCommon/GPUCommonPass.h
    R mlir/include/mlir/Conversion/GPUToCUDA/GPUToCUDAPass.h
    M mlir/include/mlir/InitAllPasses.h
    M mlir/lib/Conversion/CMakeLists.txt
    M mlir/lib/Conversion/GPUCommon/CMakeLists.txt
    A mlir/lib/Conversion/GPUCommon/ConvertKernelFuncToBlob.cpp
    R mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt
    R mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
    A mlir/test/Conversion/GPUToROCm/lit.local.cfg
    A mlir/test/Conversion/GPUToROCm/lower-rocdl-kernel-to-hsaco.mlir
    M mlir/test/lib/Transforms/CMakeLists.txt
    M mlir/test/lib/Transforms/TestConvertGPUKernelToCubin.cpp
    A mlir/test/lib/Transforms/TestConvertGPUKernelToHsaco.cpp
    M mlir/test/lit.site.cfg.py.in
    M mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
    M mlir/tools/mlir-opt/mlir-opt.cpp

  Log Message:
  -----------
  [mlir][gpu][mlir-cuda-runner] Refactor ConvertKernelFuncToCubin to be generic.

Make ConvertKernelFuncToCubin pass to be generic:

- Rename to ConvertKernelFuncToBlob.
- Allow specifying triple, target chip, target features.
- Initializing LLVM backend is supplied by a callback function.
- Lowering process from MLIR module to LLVM module is via another callback.
- Change mlir-cuda-runner to adopt the revised pass.
- Add new tests for lowering to ROCm HSA code object (HSACO).
- Tests for CUDA and ROCm are kept in separate directories.

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




More information about the All-commits mailing list