Add backward-compatible layer to `torch.jit.script()` API change (#522)
Summary:
This is to fix https://github.com/pytorch/benchmark/issues/405. Add compatibility layer so that benchmark can run on older pytorch versions.
Pull Request resolved: https://github.com/pytorch/benchmark/pull/522
Reviewed By: aaronenyeshi
Differential Revision: D31928920
Pulled By: xuzhao9
fbshipit-source-id: 2d46349b4683c00c445e3b8d006dc3fdd5c9a0a2