-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inductor: fix split+cat issue when cat order is not align the split output's order #99700
Conversation
…utput's order [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/99700
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ No FailuresAs of commit e1cf879: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…utput's order ghstack-source-id: 9a64aef2a2060776379c5830bd26466677f6cc16 Pull Request resolved: #99700
…the split output's order" we should make sure the cat order does align with the split output's order before removing the cat operation. Fix #99686. cc soumith voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
# All parts of split should be included in the cat | ||
if get_item_args != set(range(len(split_sizes))): | ||
return False | ||
# The order of get_item_args should same with cat_node used. | ||
# For example, if the split_node like split_with_sizes(input, [2, 2, 3], 1), | ||
# the cat node should be like cat([get_item(0), get_item(1), get_item(2)], 1). | ||
cat_items_args_order = [ | ||
get_arg_value(item_node, 1) for item_node in get_arg_value(cat_node, 0) | ||
] | ||
if cat_items_args_order != list(get_item_args): | ||
return False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we just expect it the same as list(range(len(split_sizes)))
? Note that get_item_args
is a set which is unordered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, we expect it same as list(range(len(split_sizes)))
.
@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 |
Stack from ghstack (oldest at bottom):
we should make sure the cat order does align with the split output's order before removing the cat operation. Fix #99686.
cc @soumith @voznesenskym @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @desertfire