-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[Fix]: ScriptObject lifting issue #130952
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
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/130952
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit 86a724d with merge base 6c65fd0 ( BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
cd57526
to
469f634
Compare
65aaaac
to
0cb99c3
Compare
@jiashenC has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary: #### Issue ScriptObject was treated as normal attribute by the converter previously. This PR lifts it to be a constant and convert it directly to a GetAttr fx node. ScriptObject would also trigger `CallMethod` and this PR adds that support as well. Test Plan: Add test case for ScriptObject. `pytest test/export/test_converter.py -s -k test_convert_script_object` Differential Revision: D60177312 Pulled By: jiashenC
0cb99c3
to
27eccf0
Compare
This pull request was exported from Phabricator. Differential Revision: D60177312 |
|
||
attr_value = node.output() | ||
if self.is_top_level_graph(): | ||
if attr_value.type().annotation_str == "Tensor": |
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.
I find this check to be not reliable, e.g., sometimes this is Optional[Tensor]
.
Summary: ScriptObject was treated as normal attribute by the converter previously. This PR lifts it to be a constant and convert it directly to a GetAttr fx node. ScriptObject would also trigger `CallMethod` and this PR adds that support as well. Test Plan: Add test case for ScriptObject. `pytest test/export/test_converter.py -s -k test_convert_script_object` Differential Revision: D60177312 Pulled By: jiashenC
eb6efea
to
3b74950
Compare
Summary: ScriptObject was treated as normal attribute by the converter previously. This PR lifts it to be a constant and convert it directly to a GetAttr fx node. ScriptObject would also trigger `CallMethod` and this PR adds that support as well. Test Plan: Add test case for ScriptObject. `pytest test/export/test_converter.py -s -k test_convert_script_object` Differential Revision: D60177312 Pulled By: jiashenC
Summary: ScriptObject was treated as normal attribute by the converter previously. This PR lifts it to be a constant and convert it directly to a GetAttr fx node. ScriptObject would also trigger `CallMethod` and this PR adds that support as well. Test Plan: Add test case for ScriptObject. `pytest test/export/test_converter.py -s -k test_convert_script_object` Differential Revision: D60177312 Pulled By: jiashenC
Summary: ScriptObject was treated as normal attribute by the converter previously. This PR lifts it to be a constant and convert it directly to a GetAttr fx node. ScriptObject would also trigger `CallMethod` and this PR adds that support as well. Test Plan: Add test case for ScriptObject. `pytest test/export/test_converter.py -s -k test_convert_script_object` Differential Revision: D60177312 Pulled By: jiashenC
3b74950
to
7c1f34c
Compare
@jiashenC has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
b316509
to
b24fbfa
Compare
@jiashenC has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary: ScriptObject was treated as normal attribute by the converter previously. This PR lifts it to be a constant and convert it directly to a GetAttr fx node. ScriptObject would also trigger `CallMethod` and this PR adds that support as well. Test Plan: Add test case for ScriptObject. `pytest test/export/test_converter.py -s -k test_convert_script_object` Differential Revision: D60177312 Pulled By: jiashenC
b24fbfa
to
491948b
Compare
@jiashenC has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary: ScriptObject was treated as normal attribute by the converter previously. This PR lifts it to be a constant and convert it directly to a GetAttr fx node. ScriptObject would also trigger `CallMethod` and this PR adds that support as well. Test Plan: Add test case for ScriptObject. `pytest test/export/test_converter.py -s -k test_convert_script_object` Differential Revision: D60177312 Pulled By: jiashenC
491948b
to
86a724d
Compare
@jiashenC has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@pytorchbot merge -f 'Landed internally' (Initiating merge automatically since Phabricator Diff has merged, using force because this PR might not pass merge_rules.json but landed internally) |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Issue
ScriptObject was treated as normal attribute by the converter previously. This PR lifts it to be a constant and convert it directly to a GetAttr fx node. ScriptObject would also trigger
CallMethod
and this PR adds that support as well.Test Plan
Add test case for ScriptObject.
pytest test/export/test_converter.py -s -k test_convert_script_object