[all-commits] [llvm/llvm-project] a43f7d: [mlir][tensor] Extend reshape utils.

Stephan Herhut via All-commits all-commits at lists.llvm.org
Fri Feb 18 00:58:18 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a43f7d6d76984ddae4a5e5e0bebf82ee2edebabb
      https://github.com/llvm/llvm-project/commit/a43f7d6d76984ddae4a5e5e0bebf82ee2edebabb
  Author: Stephan Herhut <herhut at google.com>
  Date:   2022-02-18 (Fri, 18 Feb 2022)

  Changed paths:
    M mlir/lib/Dialect/Utils/ReshapeOpsUtils.cpp
    M mlir/test/Dialect/Tensor/canonicalize.mlir

  Log Message:
  -----------
  [mlir][tensor] Extend reshape utils.

This change changes the handling of trailing dimensions with unknown
extent. Users of the changessociationIndicesForReshape helper should
see benefits when transforming reshape like operations into
expand/collapse pairs if the higher-rank type has trailing unknown
dimensions.

The motivating example is a reshape from tensor<16x1x?xi32> to
tensor<16xi32> that can be modeled as collapsing the three dimensions.

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




More information about the All-commits mailing list