pytorch
608f44b2 - ns for fx: update graph matching to not match nodes with equal types (#52402)

Commit
3 years ago
ns for fx: update graph matching to not match nodes with equal types (#52402) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/52402 Before this PR, any pair of subgraphs with base nodes of equal types matched. While sometimes this is useful, this should be off by default to properly handle user defined modules and functions, for which we do not know how to extract weights or cast to the right input type. In a future PR, we can add hooks to turn on matching for nodes of equal types, for the situations where it makes sense. Test Plan: ``` python test/test_quantization.py TestFXGraphMatcher.test_nodes_with_equal_types_do_not_get_matched ``` Imported from OSS Reviewed By: hx89 Differential Revision: D26499848 fbshipit-source-id: 5818b88eb7fd8ed36390f60aa1a18228bb50507e
Author
Parents
Loading