-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[ONNX] Modified slice node in inplace ops pass #43275
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
[ONNX] Modified slice node in inplace ops pass #43275
Conversation
💊 CI failures summary and remediationsAs of commit 8af31c5 (more details on the Dr. CI page):
ci.pytorch.org: 1 failedThis comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group. This comment has been revised 11 times. |
LG, please fix the lint failure. |
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.
LGTM, please ensure CI is all green by rerun/rebase.
…kare/slice_export_bug
…kare/slice_export_bug
…kare/slice_export_bug
@bzinodev build failure seems unrelated to changes made in code |
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.
@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
auto start = slice->get(attr::start) ? slice->get(attr::start) : 0; | ||
auto end = slice->get(attr::end) ? slice->get(attr::end) : int_max; | ||
auto step = slice->get(attr::step); | ||
TORCH_INTERNAL_ASSERT((slice->inputs()).size() == 5); |
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.
How about the opset < 11, if we set start and end as arguments, not inputs
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.
For this pass the operator is aten::slice, start/end/step would always be inputs. The function
ConvertSliceToIndex is only called on encountering an index_put node.
@houseroad merged this pull request in 9ca338a. |
Fixes #42292