[all-commits] [llvm/llvm-project] beaffb: [mlir][transform] Decouple GPUDeviceMapping attrib...

Guray Ozen via All-commits all-commits at lists.llvm.org
Tue Nov 15 09:16:46 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: beaffb041c689deb30d9b06fb3a68a1a4bae48a4
      https://github.com/llvm/llvm-project/commit/beaffb041c689deb30d9b06fb3a68a1a4bae48a4
  Author: Guray Ozen <guray.ozen at gmail.com>
  Date:   2022-11-15 (Tue, 15 Nov 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/GPU/TransformOps/GPUDeviceMappingAttr.td
    M mlir/include/mlir/Dialect/GPU/TransformOps/GPUTransformOps.h
    M mlir/include/mlir/Dialect/SCF/IR/DeviceMappingInterface.td
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/GPU/TransformOps/GPUTransformOps.cpp
    M mlir/test/Dialect/GPU/transform-gpu-failing.mlir

  Log Message:
  -----------
  [mlir][transform] Decouple GPUDeviceMapping attribute from the GPU transfrom dialect code generator

`DeviceMappingAttrInterface` is implemented as unifiying mechanism for thread mapping. A code generator could use any attribute that implements this interface to lower `scf.foreach_thread` to device specific code. It is allowed to choose its own mapping and interpretation.

Currently, GPU transform dialect supports only `GPUThreadMapping` and `GPUBlockMapping`; however, other mappings should to be supported as well. This change addresses this issue. It decouples gpu transform dialect from the `GPUThreadMapping` and `GPUBlockMapping`. Now, they can work any other mapping.

Reviewed By: nicolasvasilache

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




More information about the All-commits mailing list