[quant] support linear_relu_dynamic for qnnpack backend (#63820)
authorSupriya Rao <supriyar@fb.com>
Fri, 27 Aug 2021 04:05:56 +0000 (21:05 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 27 Aug 2021 04:12:02 +0000 (21:12 -0700)
commit975f4ccad6fb7ca13c50ee628ec3fb3a77a64893
tree463d8fb342ff9c355042356465b1921717635a1e
parentc7027f19efbb2f7b274c9e5fc0e87fe4b084e6ae
[quant] support linear_relu_dynamic for qnnpack backend (#63820)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/63820

Adds support in the operator directly to call relu operator if relu fusion is enabled.
Once QNNPACK natively supports relu fusion in the linear_dynamic this can be removed

Test Plan:
python test/test_quantization.py TestDynamicQuantizedLinear.test_qlinear

Imported from OSS

Reviewed By: vkuzo

Differential Revision: D30502813

fbshipit-source-id: 3352ee5f73e482b6d1941f389d720a461b84ba23
aten/src/ATen/native/quantized/cpu/qlinear_dynamic.cpp
test/quantization/core/test_quantized_op.py