Pass shape hints for AOT case (#48989)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/48989
1. Pass shape hints at model export time.
2. A bit of logging to show if passed shape hints are loaded by OnnxifiOp.
From jfix71:
> for AOT we skip onnxifi on the predictor side. We do onnxifi at model export time
Test Plan:
Temporarily added extra logging to verify that we use passed shape hints for AOT scenario. Here are the test results:
1. AOT model generation https://fburl.com/paste/1dtxrdsr shows that pybind_state.cc is called.
2. Running predictor service https://fburl.com/paste/d4qcizya with more logging in onnxifi_op.cc D25344546 shows that we use provided shape hints instead of doing shape inference every time.
Reviewed By: jfix71
Differential Revision: D25344546
fbshipit-source-id: 799ca4baea23ed4d81d89d00cb3a52a1cbf69a44