[quant][fx] Remove input_output_observed from BinaryOpQuantizeHandler (#74776)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74776
when both inputs are scalars, fx tracing will directly calculate the result, instead of generating an op in the fx graph
so num_tensor_args will always be greater than 1 for binary ops, so the input_output_observed will always return True
for BinaryQuantizeHandler
We will remove input_output_observed method after dynamic quantization in qconfig is properly supported
Test Plan:
python test/test_quantization.py TestQuantizeFx
python test/test_quantization.py TestQuantizeFxOps
Imported from OSS
Reviewed By: albanD
Differential Revision: D35153531
fbshipit-source-id: fa777429eeb64a6a78a98f8d8dcd9e0903c8b209
(cherry picked from commit 676becb650daf29977dbfeb8307de1b19a8d9243)