-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[JIT] Allow del statements with multiple targets #48876
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
**Summary** This commit adds support for `del` statements with multiple targets. Targets are deleted left-to-right just like Python. **Test Plan** This commit updates the `TestBuiltins.test_del_multiple_operands` unit test to actually test that multiple deletion works instead of asserting that an error is thrown. [ghstack-poisoned]
**Summary** This commit adds support for `del` statements with multiple targets. Targets are deleted left-to-right just like Python. **Test Plan** This commit updates the `TestBuiltins.test_del_multiple_operands` unit test to actually test that multiple deletion works instead of asserting that an error is thrown. ghstack-source-id: 95de87f Pull Request resolved: #48876
💊 CI failures summary and remediationsAs of commit 28eaa17 (more details on the Dr. CI page): ✅ None of the CI failures appear to be your fault 💚
🚧 5 ongoing upstream failures:These were probably caused by upstream breakages that are not fixed yet:
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 13 times. |
|
||
py_out = del_list_multiple_operands([0, 1, 2]) | ||
jit_out = torch.jit.script(del_list_multiple_operands)([0, 1, 2]) | ||
self.assertEquals(py_out, jit_out) |
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.
Use self.checkScript
?
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.
You can't - list inputs are mutable. A list input will be mutated by the script function and then reused by the eager mode function.
**Summary** This commit adds support for `del` statements with multiple targets. Targets are deleted left-to-right just like Python. **Test Plan** This commit updates the `TestBuiltins.test_del_multiple_operands` unit test to actually test that multiple deletion works instead of asserting that an error is thrown. **Fixes** This commit fixes #48635. [ghstack-poisoned]
**Summary** This commit adds support for `del` statements with multiple targets. Targets are deleted left-to-right just like Python. **Test Plan** This commit updates the `TestBuiltins.test_del_multiple_operands` unit test to actually test that multiple deletion works instead of asserting that an error is thrown. ghstack-source-id: 4ec341a Pull Request resolved: #48876
@SplitInfinity merged this pull request in 3f9ff48. |
Stack from ghstack:
Summary
This commit adds support for
del
statements with multiple targets.Targets are deleted left-to-right just like Python.
Test Plan
This commit updates the
TestBuiltins.test_del_multiple_operands
unittest to actually test that multiple deletion works instead of asserting
that an error is thrown.
Fixes
This commit fixes #48635.
Differential Revision: D25386285