[all-commits] [llvm/llvm-project] b37a03: [mlir][tosa] Make tosa.resize to linalg avoid redu...
Rob Suderman via All-commits
all-commits at lists.llvm.org
Thu Dec 15 16:23:58 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b37a0318cb026fe30a76482e36f66f8a3e61e055
https://github.com/llvm/llvm-project/commit/b37a0318cb026fe30a76482e36f66f8a3e61e055
Author: Rob Suderman <suderman at google.com>
Date: 2022-12-15 (Thu, 15 Dec 2022)
Changed paths:
M mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
M mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-resize.mlir
Log Message:
-----------
[mlir][tosa] Make tosa.resize to linalg avoid redundant loads for unit width
When using a tosa resize for ?x1x1x? to ?x1x?x? we should avoid doing a 2D
interpolation as only two unique values are loaded. As the extract operation
performance numerical computation on its values the superfluous extracts may
fail to be coalesced. Instead we only interpolate between the values if there
are multiple values to interpolate between.
For the integer case we also perform scaling by the scaling-factor to apply
the same integer scaling behavior as interpolation.
Reviewed By: jpienaar, NatashaKnk
Differential Revision: https://reviews.llvm.org/D139979
More information about the All-commits
mailing list