-
Notifications
You must be signed in to change notification settings - Fork 348
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
Changes from 7 commits
ea93cbb
470fec1
eeddec5
d884463
8aef270
a09c6e9
d3a0add
3e3fce6
70ce043
1c54161
bc6a0bf
06ef2e9
9ad937f
48455ee
3557e69
cf3a4d9
b6d8093
f95868a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -114,10 +114,14 @@ def _get_greatest_ancestor_node_source(node: Node) -> "NodeSource": | |||
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 commentThe 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?
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. seems like the current update is OK |
||||
if FROM_NODE_KEY not in node.meta or node.meta[FROM_NODE_KEY] is None: | ||||
# Guard nodes (like _guards_fn) created by newer PyTorch versions might not have from_node metadata | ||||
# Skip these nodes as they are not part of the original user graph | ||||
return False | ||||
|
||||
if ( | ||||
FROM_NODE_KEY not in node.meta | ||||
or node.meta[FROM_NODE_KEY] is None | ||||
or node.meta[FROM_NODE_KEY][-1].pass_name | ||||
node.meta[FROM_NODE_KEY][-1].pass_name | ||||
== "ExportedProgram.module().unlift()" | ||||
): | ||||
# This node is not part of the ExportedProgram.module().graph, so it doesn't have a debug handle | ||||
|
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
ao/test/quantization/pt2e/test_quantize_pt2e_qat.py
Line 1131 in d3a0add
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