Remove tfl.reshape op when possible
Remove tfl.reshape for the following two cases: 1. A tfl.reshape's input is from another tfl.reshape. Then these two tfl.reshape ops can be merged. 2. A tfl.reshape's result type is the same as its input type. This tfl.reshape op does nothing, which can be removed. These transformations are put in a new source file, Canonicalizer.cpp, because they are TFLite op to TFLite op transformations, and aiming to making TFLite ops more canonicalized. Also added a hasCanonicalizationPatterns marker in TableGen Op class to indicate whether an op has custom getCanonicalizationPatterns(). PiperOrigin-RevId: 223806921
Loading
Please sign in to comment