[all-commits] [llvm/llvm-project] 26a7f4: [mlir][tosa] Add accumulator type attribute to TOS...

TatWai Chong via All-commits all-commits at lists.llvm.org
Fri May 12 13:19:05 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 26a7f42306134dca659f19ca5d7bdb4fe23340f2
      https://github.com/llvm/llvm-project/commit/26a7f42306134dca659f19ca5d7bdb4fe23340f2
  Author: TatWai Chong <tatwai.chong at arm.com>
  Date:   2023-05-12 (Fri, 12 May 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Tosa/IR/TosaOpBase.td
    M mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
    M mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamed.cpp
    M mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
    M mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-named.mlir
    M mlir/test/Dialect/Tosa/ops.mlir
    M mlir/test/Dialect/Tosa/tosa-infer-shapes.mlir

  Log Message:
  -----------
  [mlir][tosa] Add accumulator type attribute to TOSA dialect

Tosa supports fp16 and fp32 accumulator type for fp16 input, but
no way to tell for computational operators whether accumulator
should be fp16 or fp32 from input type. Add this new attribute
to specify the type.

Set to fp32 by default for now. When the time fp16 is supported,
the accumulator type can be selected based on trade-off between
performance and accuracy.

Reviewed By: jpienaar

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




More information about the All-commits mailing list