[fx2trt] Add a helper function to generate specs for dynamic batch size (#69405)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/69405
Add a helper function that will generate input tensor specs with dynamic batch size.
Note that the constraint currently on this function is that the batch dimension of all these tensors should be the first dimension.
Also add more doc strings.
Test Plan:
Added unit tests.
```
Started reporting to test run: https://www.internalfb.com/intern/testinfra/testrun/7881299413036896
✓ ListingSuccess: caffe2/test/fx2trt/core:test_input_tensor_spec - main (7.455)
✓ Pass: caffe2/test/fx2trt/core:test_input_tensor_spec - test_from_tensor (caffe2.test.fx2trt.core.test_input_tensor_spec.TestTRTModule) (7.047)
✓ Pass: caffe2/test/fx2trt/core:test_input_tensor_spec - test_from_tensors_with_dynamic_batch_size (caffe2.test.fx2trt.core.test_input_tensor_spec.TestTRTModule) (7.066)
✓ Pass: caffe2/test/fx2trt/core:test_input_tensor_spec - test_from_tensors (caffe2.test.fx2trt.core.test_input_tensor_spec.TestTRTModule) (7.181)
Summary
Pass: 3
ListingSuccess: 1
```
Wait for CI to verify if this unit test can run without RE.
Reviewed By: yinghai, kflu
Differential Revision: D32853947
fbshipit-source-id: 19713e8ad5478c945385c7013f7a1b9894151fea