[all-commits] [llvm/llvm-project] 6e8e91: [MLIR][TOSA] Fix converting tosa.clamp and tosa.re...

jungpark-mlir via All-commits all-commits at lists.llvm.org
Mon Jul 11 10:18:59 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6e8e91a7b63c51f487ddfbe2d6b2372ea1310faf
      https://github.com/llvm/llvm-project/commit/6e8e91a7b63c51f487ddfbe2d6b2372ea1310faf
  Author: jungpark-mlir <jungwook.park at amd.com>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

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

  Log Message:
  -----------
  [MLIR][TOSA] Fix converting tosa.clamp and tosa.relu to linalg

Tosa to Linalg conversion crashes when input tensor is a float type other than fp32.
Because tosa.clamp and tosa.reluN have fp32 min/max attribute which is converted as arith.constant with the attribute type.
This commit fixes the crash by correctly setting the float constant type from the input tensor.

Reviewed By: eric-k256

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




More information about the All-commits mailing list