[ROCm] restore autograd tests (#48431)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/30845.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/48431
Reviewed By: zhangguanheng66
Differential Revision: D25393323
Pulled By: mruberry
fbshipit-source-id: 339644abf4ad52be306007f4040c692a45998052