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