Resubmit [Onnxifi] Generic way of passing output shape/type hints (#39377)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/39377
Previous diff D21781515 had en compliation error on OSS CI and got reverted.
Test Plan: net runner
Reviewed By: jfix71
Differential Revision: D21832199
fbshipit-source-id: 07c6b6fe3bb18dc4f4ecec82ba9b99028086f55c