work around building onnx in older rocm docker images (#39253)
Summary:
CC ezyang xw285cornell sunway513 malfet
Pull Request resolved: https://github.com/pytorch/pytorch/pull/39253
Differential Revision: D21799868
Pulled By: xw285cornell
fbshipit-source-id: 3ced799c0a3a3f1e052b362e8333dda2f76aeecd