[all-commits] [llvm/llvm-project] 4c4876: [mlir] Use target-specific GPU kernel attributes i...

ftynse via All-commits all-commits at lists.llvm.org
Fri Feb 12 05:09:50 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4c4876c314577e253a198ca3868b26fd35ec8a6e
      https://github.com/llvm/llvm-project/commit/4c4876c314577e253a198ca3868b26fd35ec8a6e
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2021-02-12 (Fri, 12 Feb 2021)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
    M mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
    M mlir/lib/Conversion/GPUCommon/CMakeLists.txt
    A mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp
    M mlir/lib/Conversion/GPUCommon/GPUOpsLowering.h
    M mlir/lib/Conversion/GPUToNVVM/CMakeLists.txt
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Conversion/GPUToROCDL/CMakeLists.txt
    M mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
    M mlir/lib/Target/LLVMIR/ConvertToNVVMIR.cpp
    M mlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp
    M mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
    M mlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir
    M mlir/test/Target/nvvmir.mlir
    M mlir/test/Target/rocdl.mlir

  Log Message:
  -----------
  [mlir] Use target-specific GPU kernel attributes in lowering pipelines

Until now, the GPU translation to NVVM or ROCDL intrinsics relied on the
presence of the generic `gpu.kernel` attribute to attach additional LLVM IR
metadata to the relevant functions. This would be problematic if each dialect
were to handle the conversion of its own options, which is the intended
direction for the translation infrastructure. Introduce `nvvm.kernel` and
`rocdl.kernel` in addition to `gpu.kernel` and base translation on these new
attributes instead.

Reviewed By: herhut

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




More information about the All-commits mailing list