[all-commits] [llvm/llvm-project] 0cfc5b: [mlir][tosa][tosa-to-linalg] Use 0 weights at skip...
Ian Tayler Lessa via All-commits
all-commits at lists.llvm.org
Thu Jul 30 09:19:21 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0cfc5bc3aa10274776306e4a4a179974d3fadb4b
https://github.com/llvm/llvm-project/commit/0cfc5bc3aa10274776306e4a4a179974d3fadb4b
Author: Ian Tayler Lessa <ian.taylerlessa at arm.com>
Date: 2026-07-30 (Thu, 30 Jul 2026)
Changed paths:
M mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
M mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir
Log Message:
-----------
[mlir][tosa][tosa-to-linalg] Use 0 weights at skippable RFFT2D locations (#212293)
The TOSA specifications indicates that when computing the imaginary
output for locations (0,0), (0,W/2), (H/2,0), (H/2, W/2),
implementations may choose to skip the computation entirely and return
0, or compute each accumulation term as `-val_real * 0.0`.
The previous legalizations used `-val_real * sin(a)` but `sin(a)` may
not return exactly 0.0 due to representation error in the input to
`sin`.
This patch updates the legalization to instead check for indices where
`sin(a)` should be replaced by `0.0` and uses a `select` op to match the
expected behaviour according to the Specification when
tosa_extra_multiplies is set to `true`.
Signed-off-by: Ian Tayler Lessa <ian.taylerlessa 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