[all-commits] [llvm/llvm-project] 535b50: [mlir][Arithmetic] Add `arith.delinearize_index` o...

Chris via All-commits all-commits at lists.llvm.org
Fri Jul 22 10:22:14 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 535b507ba58e8b5f604d53ffc961be1456d229a7
      https://github.com/llvm/llvm-project/commit/535b507ba58e8b5f604d53ffc961be1456d229a7
  Author: Christopher Bate <cbate at nvidia.com>
  Date:   2022-07-22 (Fri, 22 Jul 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/Arithmetic/IR/ArithmeticOps.td
    M mlir/include/mlir/Dialect/Arithmetic/Utils/Utils.h
    M mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp
    M mlir/lib/Dialect/Arithmetic/IR/CMakeLists.txt
    M mlir/lib/Dialect/Arithmetic/Transforms/CMakeLists.txt
    M mlir/lib/Dialect/Arithmetic/Transforms/ExpandOps.cpp
    M mlir/lib/Dialect/Arithmetic/Utils/Utils.cpp
    M mlir/test/Dialect/Arithmetic/expand-ops.mlir
    M mlir/test/Dialect/Arithmetic/invalid.mlir
    M mlir/test/Dialect/Arithmetic/ops.mlir

  Log Message:
  -----------
  [mlir][Arithmetic] Add `arith.delinearize_index` operation

This change adds a new DelinearizeIndexOp to the `arith` 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 `arith.divui` and `arith.remui` operations is also given.

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




More information about the All-commits mailing list