Skip to content
Commit f5f7e2a3 authored by Amir Bishara's avatar Amir Bishara Committed by Maya Amrami
Browse files

[mlir][tosa] Constant optimizations for reduce operations

Replace the different reduce operations which is getting
a constant tensor as an input argument with a constant
tensor.

As the arguement of the reduce operation is constant tensor
and has only a single user we could calculate the resulted
constant tensor in compilation time and replace it
with reduced memory tensor

This optimization has been implemented for:
tosa.reduce_sum
tosa.reduce_prod
tosa.reduce_any
tosa.reduce_all
tosa.reduce_max
tosa.reduce_min

Reviewed By: rsuderman

Differential Revision: https://reviews.llvm.org/D154832
parent a7612e2e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment