[Relay]Disable InferType if it was done and no changes after previous pass#17585
Merged
echuraev merged 1 commit intoapache:mainfrom Jan 27, 2025
Merged
Conversation
e522684 to
bd02406
Compare
Contributor
|
@tvm-bot rerun |
Member
|
a minor note, we are moving towards phasing out relay and use relax |
Contributor
|
@tvm-bot rerun |
Contributor
Author
It is true, and we must switch to relax and we are moving toward it. At the same time legacy relay flow sometimes has deeper and wider support. Do we know if relax flow covered all frontend capabilities which were covered by relay? Do we know which backed switched and have same support from performance point of view? |
This optimizatin allows to speedup PatternRewriter transformations by reusing of preious type inferred expression instead of perform InferType multiple times
bd02406 to
01ccffc
Compare
Member
|
As of now relax flow covers most of the onnx flows and rightfully the development focuses on the latest use-cases. So there might be delta on some legacy use-cases. However, as we move toward relax, hopefully these deltas can be closed and improved |
ShiboXing
pushed a commit
to ShiboXing/tvm
that referenced
this pull request
Aug 10, 2025
… pass (apache#17585) Disable InferType if it was done and no changes after previous pass This optimizatin allows to speedup PatternRewriter transformations by reusing of preious type inferred expression instead of perform InferType multiple times
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This optimization allows to speedup PatternRewriter transformations by reusing of previous type inferred expression instead of perform InferType multiple times
The test_pass_simplify_expr.py tests on my machine started to pass for 40 seconds vs 116 seconds main branch state