Fix cudagraph backend (#1393)
Summary:
Fix the CUDA Graph code on torchvision.
Pull Request resolved: https://github.com/pytorch/benchmark/pull/1393
Test Plan:
```
$ python run.py resnet18 -d cuda -t eval --backend cudagraph
Running eval method from resnet18 on cuda in eager mode with input batch size 256.
GPU Time: 16.525 milliseconds
CPU Total Wall Time: 16.561 milliseconds
Correctness: True
$ python run.py resnet18 -d cuda -t train --backend cudagraph
Running train method from resnet18 on cuda in eager mode with input batch size 16.
GPU Time: 7.137 milliseconds
CPU Total Wall Time: 7.199 milliseconds
Correctness: False
```
Reviewed By: davidberard98
Differential Revision: D42940096
Pulled By: xuzhao9
fbshipit-source-id: 6f38fc4b211f5a200b188cf2f8c9c83dee3a4e9b