-
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.
[Unity] Implement FNormalize for relax.op.call_tir (#16068)
* [Unity] Implement FNormalize for relax.op.call_tir Prior to this commit, `relax.op.call_tir` could express the TIR arguments as either an in-line tuple, or as a variable bound to a tuple. Because several passes assume the arguments will always be an in-line tuple, this is being codified as the normal form of `relax.op.call_tir`. Any upstream transform that produces `relax.op.call_tir` with arguments provided as a by-variable tuple will either be normalized to an in-line tuple if possible, or will produce an error during the upstream transform otherwise. This commit is specifically to allow the current usage of `Downcast<Tuple>(call->args[1])` in passes such as `CallTIRRewrite`, `FoldConstant`, `FuseTIR`, and `RewriteDataflowReshape`. * Resolve unit test failures * Added normalization for call_tir_inplace and call_tir_with_grad * Normalize arg_tuple to (arg_tuple[0], ..., arg_tuple[N]) if unknown
- Loading branch information
1 parent
c9de001
commit 0ddfc65
Showing
4 changed files
with
341 additions
and
19 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
Oops, something went wrong.