Move test QAT tests to double precision to ensure numerics match (#25189)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/25189
Change dtypes of all tensors in testqat to double precision. Without this change, the backward pass showed small mismatches the root cause of which wasnt clear. With this change, the numerics match to a precision of 1e-10 and this test is useful and provides a tight check on numerics.
ghstack-source-id: 88999698
Test Plan:
buck test caffe2/test:quantized -- 'test_conv_bn_relu \(test_qat\.IntrinsicQATModuleTest\)' --print-passing-details
Started new test run: https://our.intern.facebook.com/intern/testinfra/testrun/3377699726578151
✓ caffe2/test:quantized - test_conv_bn_relu (test_qat.IntrinsicQATModuleTest) 17.777 1/1 (passed)
Test output:
> test_conv_bn_relu (test_qat.IntrinsicQATModuleTest) ... ok
>
> ----------------------------------------------------------------------
> Ran 1 test in 17.778s
>
> OK
Finished test run: https://our.intern.facebook.com/intern/testinfra/testrun/3377699726578151
Summary (total time 22.03s):
PASS: 1
FAIL: 0
SKIP: 0
FATAL: 0
TIMEOUT: 0
OMIT: 0
Differential Revision: D17053634
fbshipit-source-id: e19d555adee29b49bff873fcc01f527e8272f1c6