[all-commits] [llvm/llvm-project] 27c201: [MLIR] Add parallel loop collapsing.

Tres via All-commits all-commits at lists.llvm.org
Thu Mar 26 01:33:29 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 27c201aa1d972c10bfc38ff5b4abaf78ab3d2ad2
      https://github.com/llvm/llvm-project/commit/27c201aa1d972c10bfc38ff5b4abaf78ab3d2ad2
  Author: Tres Popp <tpopp at google.com>
  Date:   2020-03-26 (Thu, 26 Mar 2020)

  Changed paths:
    M mlir/include/mlir/InitAllPasses.h
    M mlir/include/mlir/Transforms/LoopUtils.h
    M mlir/include/mlir/Transforms/Passes.h
    M mlir/lib/Transforms/CMakeLists.txt
    A mlir/lib/Transforms/ParallelLoopCollapsing.cpp
    M mlir/lib/Transforms/Utils/LoopUtils.cpp
    A mlir/test/Transforms/parallel-loop-collapsing.mlir
    A mlir/test/Transforms/single-parallel-loop-collapsing.mlir

  Log Message:
  -----------
  [MLIR] Add parallel loop collapsing.

This allows conversion of a ParallelLoop from N induction variables to
some nuber of induction variables less than N.

The first intended use of this is for the GPUDialect to convert
ParallelLoops to iterate over 3 dimensions so they can be launched as
GPU Kernels.

To implement this:
- Normalize each iteration space of the ParallelLoop
- Use the same induction variable in a new ParallelLoop for multiple
  original iterations.
- Split the new induction variable back into the original set of values
  inside the body of the ParallelLoop.

Subscribers: mgorny, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, Joonsoo, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list