-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Relax] Ignore dynamic parameters in RewriteDataflowReshape (#17086)
The Relax transform `RewriteDataflowReshape` identifies TIR functions that are equivalent to `relax.op.reshape`, and replaces them with calls to `relax.op.reshape`. This is used as a precursor for simplifications that rely on the high-level knowledge that an operator is a reshape, but also require the low-level knowledge of the adjacent TIR PrimFuncs. Prior to this commit, the `RewriteDataflowReshape` pass would only recognize static shapes, or dynamic shapes that could be inferred from the shapes of tensor arguments. This commit updates `RewriteDataflowReshape` to recognize cases where an extra symbolic variable has been provided.
- Loading branch information
1 parent
0984e97
commit 0fb5365
Showing
3 changed files
with
202 additions
and
14 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
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