pytorch
90ee6a73 - [PT2][Quant] Update op names for decomposed quantized lib (#103251)

Commit
2 years ago
[PT2][Quant] Update op names for decomposed quantized lib (#103251) Summary: Dynamo trace, via dynamo.export, with aten_graph, generates graph with nodes whose target is an isntance of torch._ops.OpOverload. Quantization workflow inserting quantize/dequantize ops which are sometimes instances of torch._ops.OpOverload (quantize_per_tensor.tensor) while other times instances of torch._ops.OpOverloadPacket (quantizer_per_tensor) is a bit inconsistent. Also not sure if it is a valid exported model, if it has nodes with target of type torch._ops.OpOverloadPacket. Without op overload name attached to the 'target', it fails during executorch tracing. Reason is that executorch tracing expects node's targets to be instances of torch._ops.OpOverload and not torch._ops.OpOverloadPacket. So for consistency and tracing reasons, fixing convert pass to insert ops which are torch._ops.OpOverload Test Plan: CI Reviewed By: jerryzh168 Differential Revision: D46342822 Pull Request resolved: https://github.com/pytorch/pytorch/pull/103251 Approved by: https://github.com/andrewor14
Author
Committer
Parents
Loading