[all-commits] [llvm/llvm-project] 20ae22: [mlir][Affine] Add affine.delinearize_index operation

Chris via All-commits all-commits at lists.llvm.org
Fri Aug 19 08:24:31 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 20ae22ba33e47ab4c9cbbde074290f9b0d8d85e2
      https://github.com/llvm/llvm-project/commit/20ae22ba33e47ab4c9cbbde074290f9b0d8d85e2
  Author: Christopher Bate <cbate at nvidia.com>
  Date:   2022-08-19 (Fri, 19 Aug 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/Affine/IR/AffineOps.td
    M mlir/include/mlir/Dialect/Affine/Passes.h
    M mlir/include/mlir/Dialect/Affine/Passes.td
    M mlir/include/mlir/Dialect/Affine/Utils.h
    M mlir/lib/Dialect/Affine/IR/AffineOps.cpp
    M mlir/lib/Dialect/Affine/IR/CMakeLists.txt
    A mlir/lib/Dialect/Affine/Transforms/AffineExpandIndexOps.cpp
    M mlir/lib/Dialect/Affine/Transforms/CMakeLists.txt
    M mlir/lib/Dialect/Affine/Utils/CMakeLists.txt
    M mlir/lib/Dialect/Affine/Utils/Utils.cpp
    A mlir/test/Dialect/Affine/affine-expand-index-ops.mlir
    M mlir/test/Dialect/Affine/invalid.mlir
    M mlir/test/Dialect/Affine/ops.mlir

  Log Message:
  -----------
  [mlir][Affine] Add affine.delinearize_index operation

 This change adds a new AffineDelinearizeIndexOp to the affine dialect.
 The operation accepts an index type as well as a basis (array of index
 values) representing how the index should be decomposed into a
 multi-index. The decomposition obeys a canonical semantic that treats
 the final basis element as "fastest varying" and the first basis element
 as "slowest varying". A naive lowering of the operation using a sequence
 of AffineApplyOps is given.

RFC was discussed on discourse here: https://discourse.llvm.org/t/rfc-tensor-extracting-slices-from-tensor-collapse-shape/64034

Reviewed By: bondhugula, nicolasvasilache

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




More information about the All-commits mailing list