[ONNX] refactor test_pytorch_onnx_onnxruntime_cuda.py (#84218)
Fix #80037
After https://github.com/pytorch/pytorch/pull/79641, the code was outdated.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/84218
Approved by: https://github.com/BowenBao