[quant][graphmode][refactor] Move the check for qconfig inside insertObserver call (#32809)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/32809
This is a refactor to help further changes to quantization.cpp
We want some operations on the graph happen before we call insertObserver for invoked methods,
especially `addIntermediateValuesToSkipObserver` since we want to skip the input of the ReLU
module in `Conv - ReLU` pattern.
Test Plan:
test_jit.py
test_quantization.py
Imported from OSS
Differential Revision: D20087844
fbshipit-source-id: 28b7fa0c7ce9e254ab9208eb344893fb705e14d9