[quant][graphmode] SwapDeQuant support prim::If (#35142)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/35142
supporting swap dequant for prim::If nodes, this includes detecting
all blocks of prim::If ends with dequantize, deleting these dequantize
and inserting new dequantize for the output of prim::If
Test Plan:
see next PR that enables swap dequant for interpolate: https://github.com/pytorch/pytorch/pull/35130
Imported from OSS
Differential Revision: D20655307
fbshipit-source-id: 4fd53fbde8e169b7d98251e72ca37a29acdeb295