Add extra filtering for scale/zero_point/dtype in FoldQuantizeCallIntoBuffer (#26224)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26224
We need to make sure they are Constant before we can do folding
Test Plan:
python test/test_jit.py 'TestJit.test_fold_quantize'
Imported from OSS
Differential Revision: D17462530
fbshipit-source-id: 2e02f980e0e7f28014d2f813035975dfc69cacd9