[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
Loading
Please sign in to comment