[all-commits] [llvm/llvm-project] d7c44a: [mlir][tosa] Fix tosa.mul to use tosa.apply_scale

rsuderman via All-commits all-commits at lists.llvm.org
Mon Mar 22 11:05:53 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d7c44a5c7870f4866f2e0e82c3297ffb7a800013
      https://github.com/llvm/llvm-project/commit/d7c44a5c7870f4866f2e0e82c3297ffb7a800013
  Author: Rob Suderman <rob.suderman at gmail.com>
  Date:   2021-03-22 (Mon, 22 Mar 2021)

  Changed paths:
    M mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
    M mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir

  Log Message:
  -----------
  [mlir][tosa] Fix tosa.mul to use tosa.apply_scale

Multiply-shift requires wider compute types or CPU specific code to avoid
premature truncation, apply_shift fixes this issue

Also, Tosa's mul op supports different input / output types. Added path that
sign-extends input values to int-32 values before multiplying.

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




More information about the All-commits mailing list