[all-commits] [llvm/llvm-project] f1f05a: [MLIR][AMDGPU] Add AMDGPU dialect, wrappers around...

Krzysztof Drewniak via All-commits all-commits at lists.llvm.org
Tue May 10 08:00:11 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f1f05a91cacb13635cac252e53e50f9f962d4627
      https://github.com/llvm/llvm-project/commit/f1f05a91cacb13635cac252e53e50f9f962d4627
  Author: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
  Date:   2022-05-10 (Tue, 10 May 2022)

  Changed paths:
    A mlir/include/mlir/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.h
    M mlir/include/mlir/Conversion/Passes.h
    M mlir/include/mlir/Conversion/Passes.td
    A mlir/include/mlir/Dialect/AMDGPU/AMDGPU.td
    A mlir/include/mlir/Dialect/AMDGPU/AMDGPUDialect.h
    A mlir/include/mlir/Dialect/AMDGPU/CMakeLists.txt
    M mlir/include/mlir/Dialect/CMakeLists.txt
    M mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
    M mlir/include/mlir/InitAllDialects.h
    A mlir/lib/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.cpp
    A mlir/lib/Conversion/AMDGPUToROCDL/CMakeLists.txt
    M mlir/lib/Conversion/CMakeLists.txt
    M mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
    A mlir/lib/Dialect/AMDGPU/CMakeLists.txt
    A mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp
    A mlir/lib/Dialect/AMDGPU/IR/CMakeLists.txt
    M mlir/lib/Dialect/CMakeLists.txt
    M mlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp
    A mlir/test/Conversion/AMDGPUToROCDL/amdgpu-to-rocdl.mlir
    A mlir/test/Dialect/AMDGPU/ops.mlir
    M mlir/test/Dialect/LLVMIR/rocdl.mlir
    M mlir/test/Target/LLVMIR/rocdl.mlir
    M mlir/test/mlir-opt/commandline.mlir
    M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

  Log Message:
  -----------
  [MLIR][AMDGPU] Add AMDGPU dialect, wrappers around raw buffer intrinsics

By analogy with the NVGPU dialect, introduce an AMDGPU dialect for
AMD-specific intrinsic wrappers.

The dialect initially includes wrappers around the raw buffer intrinsics.

On AMD GPUs, a memref can be converted to a "buffer descriptor" that
allows more precise control of memory access, such as by allowing for
out of bounds loads/stores to be replaced by 0/ignored without adding
additional conditional logic, which is important for performance.

The repository currently contains a limited conversion from
transfer_read/transfer_write to Mubuf intrinsics, which are an older,
deprecated intrinsic for the same functionality.

The new amdgpu.raw_buffer_* ops allow these operations to be used
explicitly and for including metadata such as whether the target
chipset is an RDNA chip or not (which impacts the interpretation of
some bits in the buffer descriptor), while still maintaining an
MLIR-like interface.

(This change also exposes the floating-point atomic add intrinsic.)

Reviewed By: ThomasRaoux

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




More information about the All-commits mailing list