-
Notifications
You must be signed in to change notification settings - Fork 25.6k
wconstab/38034-sliced-sequential #40445
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
Conversation
💊 CI failures summary and remediationsAs of commit d52062e (more details on the Dr. CI page):
XLA failureJob pytorch_xla_linux_bionic_py3_6_clang9_build is failing. Please create an issue with title prefixed by This 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 19 times. |
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.
There are a couple clean ups that we should do, but I think this is worth merging for the release because there is no fix here short of making an O(n) iteration into O(n^2).
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.
Can you error if this isn't a ModuleList here ? nn.ModuleDict doesn't work either (no handling of slices) https://github.com/pytorch/pytorch/blob/master/torch/nn/modules/container.py#L284
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.
maybe add: TODO @wconstab refactor using Symbol instead of string for comparison here
and maybe some context on why we are intercepting the slicing for modulelists/sequentials here / normal code emission won't work. (doesn't have to be too long).
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.
another TODO: @wconstab refactor using asTuple
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.
@wconstab has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
You should probably rebase this to a green master. Also, try to have a more descriptive PR title in the future |
4638860
to
e9ceb44
Compare
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.
@wconstab has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
- fixes pytorch#38034 - works around missing slice functionality in Sequential by casting to tuple and slicing that instead - supports iterating on the resulting slice but not call()
e9ceb44
to
d52062e
Compare
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.
@wconstab has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
These failures look OK to me. |
Partial support for slicing of Sequential containers.
by converting to tuple
not direct call() on the sliced sequential