forked from apache/tvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Unity][Relax] Make RewriteDataflowReshape only rewrite volume-preser…
…ving ops (apache#15112) * [Unity] Make RewriteDataflowReshape only rewrite volume-preserving ops The reshape operator expects that the number of elements in the source is the same as the number of elements in the result. There are operators that could have a reshape pattern that don't meet this requirement (e.g. strided_slice), and they should not be converted to reshape. * Move shape verification to IsCallingTIRReshape * Replace ICHECK_EQ(used_arg_indices.size(), 1) with return Since the check for has-reshape-pattern is done after this check, so don't abort if the check fails, just return.
- Loading branch information
Showing
2 changed files
with
93 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters