Migrate to Graph.materialize_symints; stop passing raw SymInts#20199
Migrate to Graph.materialize_symints; stop passing raw SymInts#20199laithsakka wants to merge 1 commit into
Conversation
Summary: reland plan for pytorch/pytorch#186272 due to executorch dependency have to stage changes !! Updates the ARM backend passes (convert_full_like_to_full, decompose_linear, decompose_select, insert_dynamic_padding, rewrite_conv, size_adjust_input) and the ExportPass base to materialize SymInt-typed FX-node arguments via Graph.materialize_symints / create_size_node, so they no longer pass raw SymInts to Graph.create_node and the new pytorch warning falls silent. Test assertions in test_decompose_select_pass / test_insert_dynamic_padding_pass / test_dynamic_shape_propagation are updated to expect FX Nodes (with the SymInt stored in meta['val']). This is the second of three diffs split from D107573548. Differential Revision: D107938874
|
@laithsakka has exported this pull request. If you are a Meta employee, you can view the originating Diff in D107938874. |
This PR needs a
|
|
Hi @laithsakka thanks for this, do you mind fixing the linting/mypy so this can be approved/merged? 🙏 We have some patches on it way that would look different if this gets merged so we are now planning to do them after. :) |
|
@claude review this PR. |
|
Claude finished @digantdesai's task in 5m 9s —— View job PR Review: Migrate to
|
|
Too many CI issues, rebase please? |
|
started new diff due to export issues https://www.internalfb.com/diff/D109610966 |
Summary:
reland plan for pytorch/pytorch#186272 due to executorch dependency have to stage changes !!
Updates the ARM backend passes (convert_full_like_to_full,
decompose_linear, decompose_select, insert_dynamic_padding,
rewrite_conv, size_adjust_input) and the ExportPass base to materialize
SymInt-typed FX-node arguments via Graph.materialize_symints /
create_size_node, so they no longer pass raw SymInts to
Graph.create_node and the new pytorch warning falls silent.
Test assertions in test_decompose_select_pass /
test_insert_dynamic_padding_pass / test_dynamic_shape_propagation are
updated to expect FX Nodes (with the SymInt stored in meta['val']).
This is the second of three diffs split from D107573548.
Differential Revision: D107938874
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani