Eliminate array copy in NormalizeOp#40952
Conversation
|
@am15h Can you please resolve conflicts? Thanks! |
|
I had some experiments (but might be stale) that getting values pixel by pixel is even slower. Do you have any numbers about how performance will be improved with this change? Thanks! |
|
@xunkai55 This optimization reduced the normalization time by more than half in the tflite flutter helper library . Does this change make it slower on Android?
The support library was moved to its own repo a few hours ago, I will need to open a PR there. |
|
Sorry for the code move. Indeed, let's have a PR in that repo. If you have no testing environment, I would help run a benchmark internally. Once you have the PR please let me know. |
That would be great. I have opened a new PR tensorflow/tflite-support#14. |
This minor optimization eliminates array copy in NormalizeOp and improves efficiency by getting float value by absIndex.