[all-commits] [llvm/llvm-project] 110c1b: [mlir][tosa] Improve performance of tosa.transpose...

Rob Suderman via All-commits all-commits at lists.llvm.org
Fri Mar 24 12:51:24 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 110c1b64a7b9984a604aa2809e0fb8c01278609d
  Author: Spenser Bauman <sbauman at mathworks.com>
  Date:   2023-03-24 (Fri, 24 Mar 2023)

  Changed paths:
    M mlir/lib/Dialect/Tosa/Transforms/TosaFoldConstantTranspose.cpp
    M mlir/test/Dialect/Tosa/constant-op-fold.mlir

  Log Message:
  [mlir][tosa] Improve performance of tosa.transpose constant folding

Folding of the tosa.transpose operation is both time and memory
intensive as the underlying ElementsAttr is processed as a sequence of
Attributes. This change attempts operate on the underlying raw data of
the ElementsAttr.

In an example resnet50 network, this change reduces the time spent in
folding transpose ops from 35s to 1.5s.

Reviewed By: GeorgeARM, rsuderman, stellaraccident

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

More information about the All-commits mailing list