fix rocm test (#19663)
Summary:
for some reason exec in python fails on rocm build alone
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19663
Differential Revision: D15061382
Pulled By: eellison
fbshipit-source-id: d6e1776e88c22de973796e5080147e6d31aba477