[all-commits] [llvm/llvm-project] cf3b03: [mlir][tosa][tosa-to-linalg] Add NaN Mode Lowering...

Jack Frankland via All-commits all-commits at lists.llvm.org
Tue Feb 25 08:22:34 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cf3b0368a55c1c285dd80f12b044b58e87a425ac
      https://github.com/llvm/llvm-project/commit/cf3b0368a55c1c285dd80f12b044b58e87a425ac
  Author: Jack Frankland <jack.frankland at arm.com>
  Date:   2025-02-25 (Tue, 25 Feb 2025)

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

  Log Message:
  -----------
  [mlir][tosa][tosa-to-linalg] Add NaN Mode Lowering (#125668)

Add support for NaN propagation lowering in the `tosa-to-linalg` and
`tosa-to-linalg-named` conversions by conditionally checking for NaN in
the case of ignore semantics and materializing the appropriate select
operations. Note that the default behviour of "propagate" matches that
of the arith dialect and so in that case we can avoid creating the
checks altogether.

Add appropriate lit tests including negative tests which check the
various comparisons and selects are materialized as appropriate.

This affects the following TOSA operators:
* arg_max
* max_pool_2d
* clamp
* reduce_max
* reduce_min
* maximum
* minimum

Signed-off-by: Jack Frankland <jack.frankland at arm.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list