[all-commits] [llvm/llvm-project] 5c18ae: [MLIR][Tensor] Canonicalize expand/collapse_shape ...

LiqinWeng via All-commits all-commits at lists.llvm.org
Wed Jan 4 13:10:41 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5c18ae3135d1ff4b9e554480da78bc93e35ef00a
      https://github.com/llvm/llvm-project/commit/5c18ae3135d1ff4b9e554480da78bc93e35ef00a
  Author: liqinweng <Liqin.Weng at streamcomputing.com>
  Date:   2023-01-04 (Wed, 04 Jan 2023)

  Changed paths:
    M mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
    M mlir/test/Dialect/Tensor/canonicalize.mlir

  Log Message:
  -----------
  [MLIR][Tensor] Canonicalize expand/collapse_shape of splat to splat

Collapsing / expanding a splatted value can be replaced with a single `tensor.splat` operation. Replace
these cases with a simple `tensor.splat` operation.

Reviewed By: rsuderman

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




More information about the All-commits mailing list