[quant][core][improvement] Added warnings to quantized dynamic conv and linear ops when reduce_range=true
Summary:
Previously, the backend code "silently" ignores reduce_range=true when
using the qnnpack backend (which does not require a reduction in range).
We evaluated either 1) respecting the reduction in range to conform with
other backends (e.g., fbgemm) even when qnnpack does support the full
range and outputting a warning to let the user know that reduce_range
shoudl be set to false for qnnpack backend 2) throwing a warning and letting the user know that the
reduce_range=true setting is being ignored.
Option 1 would halve the range which could have some negative
implications to accuracy and lead to bc-breaking changes. Option 2 is also not ideal because it ignores any user settings
for reduce_range=true when using the qnnpack backend with dynamic and
linear quantized ops. We decided to go with option 2 as it is not
bc-breaking.
Fixes #68278
Test plan:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79273
Approved by: https://github.com/jerryzh168, https://github.com/vkuzo