Fix duplicate pattern error#139321
Conversation
…rch patterns but different match [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/139321
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 6a86ef7 with merge base cf76c05 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Any reason |
|
@ProExpertProg yes, agreed, they could be scoped to a pass. will update |
vllm had an error when we were incorrectly stating two patterns are duplicates. See, comment inline: For a particular generated pattern repr, store all the equivalent graphs that used to generate them. Because we ignore certain patterns in searching, but not in matching, use the graph to distinguish if two equivalent searches are actually different. Element are first inserted as graphs and lazily converted to their str reprs when there is a duplicate. If the graph is not present we will error on duplicate. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 ColinPeppler amjames desertfire chauhang aakhundov [ghstack-poisoned]
|
@pytorchbot rebase |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
|
Rebase failed due to Command Raised by https://github.com/pytorch/pytorch/actions/runs/12507427410 |
shunting314
left a comment
There was a problem hiding this comment.
So the PR change the duplication check from
- check string representation of pattern
to - check string representation of the fx graph generating the pattern
?
My questions is, why two patterns with the same string representation could be generated by different fx graphs (in the vllm case). Due to Ignored() pattern?
|
@shunting314 yes, due to |
| return x - 2 | ||
|
|
||
| patterns = PatternMatcherPass() | ||
| torch.set_default_device("cuda") |
There was a problem hiding this comment.
Wouldn't that potentially affect other tests in a very weird ways? Shouldn't one better use with torch.device("cuda"): or just alloc next tensor on the device you want?
There was a problem hiding this comment.
@malfet was reusing repro and forgot to update, agreed. although having said that - there are a few tests which use this pattern.. so if it is harmful, we should fix them.
vllm had an error when we were incorrectly stating two patterns are duplicates. See, comment inline: For a particular generated pattern repr, store all the equivalent graphs that used to generate them. Because we ignore certain patterns in searching, but not in matching, use the graph to distinguish if two equivalent searches are actually different. Pull Request resolved: pytorch#139321 Approved by: https://github.com/shunting314
…de in (#143975)" This reverts commit 7c1c073. Reverted #143975 on behalf of https://github.com/jeanschmidt due to Need to revert in order to be able to revert #139321 feel free to merge it back once conflicts are cleared ([comment](#143975 (comment)))
…143975) test_pattern_matcher.py Fix #143974 Pull Request resolved: #143975 Approved by: https://github.com/malfet
|
@pytorchbot revert -m "breaking internal signals" -c ghfirst |
|
@pytorchbot successfully started a revert job. Check the current status here. |
|
@eellison your PR has been successfully reverted. |
This reverts commit 9e8d84f. Reverted #139321 on behalf of https://github.com/jeanschmidt due to breaking internal signals ([comment](#139321 (comment)))
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
…device-bias hard code in" Re-land #143975. Fix "cuda" hard code in test_pattern_matcher.py introduced by #139321 Fix #143974 cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 ColinPeppler amjames desertfire chauhang aakhundov [ghstack-poisoned]
… code in" Re-land #143975. Fix "cuda" hard code in test_pattern_matcher.py introduced by #139321 Fix #143974 cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 ColinPeppler amjames desertfire chauhang aakhundov [ghstack-poisoned]
…device-bias hard code in" Re-land #143975. Fix "cuda" hard code in test_pattern_matcher.py introduced by #139321 Fix #143974 cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 ColinPeppler amjames desertfire chauhang aakhundov [ghstack-poisoned]
… code in" Re-land #143975. Fix "cuda" hard code in test_pattern_matcher.py introduced by #139321 Fix #143974 cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 ColinPeppler amjames desertfire chauhang aakhundov [ghstack-poisoned]
…144456) Re-land #143975. Fix "cuda" hard code in test_pattern_matcher.py introduced by #139321 Fix #143974 Pull Request resolved: #144456 Approved by: https://github.com/EikanWang, https://github.com/malfet, https://github.com/jansel ghstack dependencies: #144457
Stack from ghstack (oldest at bottom):
vllm had an error when we were incorrectly stating two patterns are duplicates. See, comment inline:
For a particular generated pattern repr, store all the equivalent graphs that used to generate them. Because we ignore certain patterns in searching, but not in matching, use the graph to distinguish if two equivalent searches are actually different.
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang @aakhundov