pytorch
37a40461 - ns for fx: add allowlist for ops with same signature across dtypes (#55154)

Commit
3 years ago
ns for fx: add allowlist for ops with same signature across dtypes (#55154) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/55154 Adds functionality to NS to allow matching nodes which have the same signature across dtypes. For now, only the skeleton is added, we can fill out the rest of the ops later. This is to unblock the work to change `cat` to have the same signature for fp32 and int8, and keep the testing we have for `cat` in NS. For context, the main reason we are not matching nodes with equal types, for now, is user defined types for which we do not know the signature. For now, the design is strictly allowlist of everything. In the future, we may adjust the design to safely match user defined types. Test Plan: ``` python test/test_quantization.py TestFXNumericSuiteCoreAPIs.test_ops_with_same_fp32_and_int8_signature python test/test_quantization.py TestFXGraphMatcher.test_nodes_with_equal_types_do_not_get_matched ``` Imported from OSS Reviewed By: raghuramank100 Differential Revision: D27504624 fbshipit-source-id: 4f8eb4f3258caf6f99aa373ca7ba516ebbcf4779
Author
Parents
Loading