[all-commits] [llvm/llvm-project] 89bb0c: [mlir][transform] Create GPU transform dialect

Guray Ozen via All-commits all-commits at lists.llvm.org
Tue Oct 4 04:09:26 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 89bb0cae46f85bdfb04075b24f75064864708e78
      https://github.com/llvm/llvm-project/commit/89bb0cae46f85bdfb04075b24f75064864708e78
  Author: Guray Ozen <guray.ozen at gmail.com>
  Date:   2022-10-04 (Tue, 04 Oct 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/GPU/CMakeLists.txt
    A mlir/include/mlir/Dialect/GPU/TransformOps/CMakeLists.txt
    A mlir/include/mlir/Dialect/GPU/TransformOps/GPUTransformOps.h
    A mlir/include/mlir/Dialect/GPU/TransformOps/GPUTransformOps.td
    M mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
    M mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
    M mlir/include/mlir/InitAllDialects.h
    M mlir/lib/Dialect/GPU/CMakeLists.txt
    A mlir/lib/Dialect/GPU/TransformOps/CMakeLists.txt
    A mlir/lib/Dialect/GPU/TransformOps/GPUTransformOps.cpp
    M mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
    A mlir/test/Dialect/GPU/transform-gpu.mlir
    R mlir/test/Dialect/Linalg/transform-gpu.mlir
    M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

  Log Message:
  -----------
  [mlir][transform] Create GPU transform dialect

This revision adds GPU transform dialect. It also introduce a prefix such as "transform.gpu" for all ops related to this dialect.

MLIR already had two GPU transform op in linalg. This revision moves these ops into GPUTransformOps. The Ops are as follows:

`transform.structured.map_nested_foreach_thread_to_gpu_blocks`  -> `transform.gpu.map_foreach_to_blocks`
This op selects the outermost (toplevel) foreach_thread and parallelize across GPU blocks. It can also generate `gpu_launch`.

`transform.structured.map_nested_foreach_thread_to_gpu_threads` -> `transform.gpu.map_nested_foreach_to_threads`
This op parallelizes nested foreach_thread that are inside `gpu_launch` across GPU threads.

It doesn't add new functionality, but there are some minor refactoring of the code.

Reviewed By: ftynse

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




More information about the All-commits mailing list