[fx2trt] Dynamic shape inference support
Summary:
Add a field called `shape_range` to `inputTensorSpec` which allow user to indicate the range of the input shape.
Make all current converters work with dynamic shape expect `layer_norm`. Need to make the layer_norm plugin to be `IPluginV2Ext`.
Some ops only have limited dynamic shape support for now:
- "linear": only support at most 1 dynamic dim. We add full support but I'm thinking breaking down linear to matmul + add.
- "adaptive_avgpool`: right now we lower it to trt avgpool which means we need to know the last two dims to calculate parameters like kernel_size, strides, etc. Follow up would be make a plugin for adaptive avgpool. TRTorch already have one, we can borrow it.
Test Plan: Added unit tests for dynamic shape inference for converter tests.
Reviewed By: jackm321
Differential Revision: D29940705
fbshipit-source-id: 1eab53a8cfd5e8db0be57845062e9794578165d1