[quant] Make conv2d_prepack and linear_prepack pure (#35073)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/35073
We want to do constant propagation for quantize_per_tensor/quantize_per_channel
which will produce results that's consumed by these ops, and since we need to
make sure the output of the node has no writer before constant prop through the node,
the consumer needs to be pure as well.
Test Plan:
see next PR
Imported from OSS
Differential Revision: D20655310
fbshipit-source-id: 3e33662224c21b889c8121b823f8ce0b7da75eed