-
Notifications
You must be signed in to change notification settings - Fork 345
Update python to 3.10 #3119
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
Update python to 3.10 #3119
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3119
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 9 PendingAs of commit f95868a with merge base f64daac ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Thanks for the PR. |
04a608c
to
d9f5a53
Compare
d9f5a53
to
8aef270
Compare
|
||
@unittest.skip("Skipping due to AssertionError: Guard failed: x.size()[0] == 1") | ||
def test_mixing_qat_ptq(self): | ||
example_inputs = (torch.randn(2, 3, 4, 4),) |
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.
seems easy to resolve, here it uses 1 for batch size:
example_input = (torch.rand((1, in_channels)),) |
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.
@jerryzh168 I''m skipping it for now, as the fix is not stable, and this PR is important to test release. We can re-evaluate the fix in another PR.
return node_source | ||
|
||
def _is_node_in_original_graph(node: Node) -> bool: | ||
# Handle guard nodes that don't have from_node metadata in newer PyTorch versions |
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.
@tugsbayasgalan is this change expected? should we using non-strict mode or strict mode?
ep = torch.export.export(m, example_inputs, strict=True) |
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.
Yeah we made guard checking code as actual node in the graph so it makes sense this node doesn't have FROM_NODE. cc: @avikchaudhuri
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.
@avikchaudhuri What's the best way to update this check?
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.
seems like the current update is OK
89e39c9
to
d3a0add
Compare
in_channels = child.linear1.weight.size(1) | ||
|
||
example_input = (torch.rand((1, in_channels)),) | ||
example_input = (torch.rand((2, 2, 2, in_channels)),) |
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.
@jerryzh168 Updating shapes here works, and doesn't give the guard dim mismatch error
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.
why does it change for 2d to 4d?
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.
The input is 4d, hence converting it to 4d works
example_inputs = (torch.randn(2, 3, 4, 4),) |
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.
OK so the previous example_input is wrong, wondering why it works before
8610826
to
f010095
Compare
f010095
to
3e3fce6
Compare
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
Update python to 3.10, as minimum supported version for pytorch2.9 onwards is python3.10
The following tests were failing and has been fixed as part of this PR: