Repository: pytorch
Issue: TorchDynamo: there has a accuracy issue for conv+unary(binary) post ops for gpu path
Labels: triaged,module: inductor

### 🐛 Describe the bug

The PR https://github.com/pytorch/pytorch/pull/87678 adds two test cases about conv+unary(binary) post ops, which meet accuracy issue:
```
2022-10-25T09:02:51.8540504Z [2022-10-25 09:00:45,140] torch._inductor.codegen.triton: [CODE] schedule: [SchedulerNode(name='buf1')]
2022-10-25T09:02:51.8540752Z [2022-10-25 09:00:45,142] torch._inductor.codegen.triton: [CODE] schedule: [SchedulerNode(name='buf2')]
2022-10-25T09:02:51.8540922Z     test_conv2d_unary_cuda failed - num_retries_left: 3
2022-10-25T09:02:51.8541022Z Traceback (most recent call last):
2022-10-25T09:02:51.8541210Z   File "/var/lib/jenkins/workspace/test/inductor/test_torchinductor.py", line 1606, in test_conv2d_unary
2022-10-25T09:02:51.8541287Z     self.common(
2022-10-25T09:02:51.8541434Z   File "/opt/conda/lib/python3.10/unittest/mock.py", line 1369, in patched
2022-10-25T09:02:51.8541539Z     return func(*newargs, **newkeywargs)
2022-10-25T09:02:51.8541719Z   File "/var/lib/jenkins/workspace/test/inductor/test_torchinductor.py", line 358, in check_model_cuda
2022-10-25T09:02:51.8541800Z     check_model(
2022-10-25T09:02:51.8541946Z   File "/opt/conda/lib/python3.10/unittest/mock.py", line 1369, in patched
2022-10-25T09:02:51.8542049Z     return func(*newargs, **newkeywargs)
2022-10-25T09:02:51.8542227Z   File "/var/lib/jenkins/workspace/test/inductor/test_torchinductor.py", line 256, in check_model
2022-10-25T09:02:51.8542313Z     self.assertEqual(
2022-10-25T09:02:51.8542581Z   File "/opt/conda/lib/python3.10/site-packages/torch/testing/_internal/common_utils.py", line 2464, in assertEqual
2022-10-25T09:02:51.8542659Z     assert_equal(
2022-10-25T09:02:51.8542915Z   File "/opt/conda/lib/python3.10/site-packages/torch/testing/_comparison.py", line 1093, in assert_equal
2022-10-25T09:02:51.8543017Z     raise error_metas[0].to_error(msg)
2022-10-25T09:02:51.8543170Z AssertionError: Tensor-likes are not close!
2022-10-25T09:02:51.8543204Z 
2022-10-25T09:02:51.8543305Z Mismatched elements: 9262 / 401408 (2.3%)
2022-10-25T09:02:51.8543524Z Greatest absolute difference: 0.00048828125 at index (0, 13, 0, 31) (up to 1e-05 allowed)
2022-10-25T09:02:51.8543669Z Greatest relative difference: 1.0 at index (0, 2, 12, 11) (up to 0.001 allowed)
```
and

```
2022-10-25T09:02:51.8199504Z     test_conv2d_binary_cuda failed - num_retries_left: 3
2022-10-25T09:02:51.8199603Z Traceback (most recent call last):
2022-10-25T09:02:51.8199787Z   File "/var/lib/jenkins/workspace/test/inductor/test_torchinductor.py", line 1687, in test_conv2d_binary
2022-10-25T09:02:51.8199862Z     self.common(
2022-10-25T09:02:51.8200011Z   File "/opt/conda/lib/python3.10/unittest/mock.py", line 1369, in patched
2022-10-25T09:02:51.8200114Z     return func(*newargs, **newkeywargs)
2022-10-25T09:02:51.8200288Z   File "/var/lib/jenkins/workspace/test/inductor/test_torchinductor.py", line 358, in check_model_cuda
2022-10-25T09:02:51.8200363Z     check_model(
2022-10-25T09:02:51.8200510Z   File "/opt/conda/lib/python3.10/unittest/mock.py", line 1369, in patched
2022-10-25T09:02:51.8200616Z     return func(*newargs, **newkeywargs)
2022-10-25T09:02:51.8200792Z   File "/var/lib/jenkins/workspace/test/inductor/test_torchinductor.py", line 256, in check_model
2022-10-25T09:02:51.8200876Z     self.assertEqual(
2022-10-25T09:02:51.8201146Z   File "/opt/conda/lib/python3.10/site-packages/torch/testing/_internal/common_utils.py", line 2464, in assertEqual
2022-10-25T09:02:51.8201222Z     assert_equal(
2022-10-25T09:02:51.8201473Z   File "/opt/conda/lib/python3.10/site-packages/torch/testing/_comparison.py", line 1093, in assert_equal
2022-10-25T09:02:51.8201571Z     raise error_metas[0].to_error(msg)
2022-10-25T09:02:51.8201728Z AssertionError: Tensor-likes are not close!
2022-10-25T09:02:51.8201733Z 
2022-10-25T09:02:51.8201834Z Mismatched elements: 27714 / 401408 (6.9%)
2022-10-25T09:02:51.8202052Z Greatest absolute difference: 0.001953125 at index (0, 28, 5, 91) (up to 1e-05 allowed)
2022-10-25T09:02:51.8202230Z Greatest relative difference: 76.47368421052632 at index (0, 14, 59, 105) (up to 0.001 allowed)
```
the failed log can be found at https://pipelines.actions.githubusercontent.com/serviceHosts/7d146c05-69c3-4c20-a0e7-818111670117/_apis/pipelines/1/runs/2323724/signedlogcontent/382?urlExpires=2022-10-26T00%3A44%3A19.3241974Z&urlSigningMethod=HMACV1&urlSignature=X5tBD2%2BVxKQX1s4LgPs2N%2BcUTCaXAMjW2dr0mPiI2ls%3D

### Versions

The test env can be seen at https://github.com/pytorch/pytorch/actions/runs/3319310723/jobs/5484655244.

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler @jansel @mlazos @soumith @yanboliang @anijain2305 @chunyuan-w @Xia-Weiwen