TensorRT icon indicating copy to clipboard operation
TensorRT copied to clipboard

✨[Feature] Support cases where LowerGraph() introduces input whose values are stored in Param

Open bowang007 opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe. #1024 There are some models that LowerGraph() might introduce new input to the entire graph after lowering, which may cause the missing value error. As what is happening here https://github.com/pytorch/TensorRT/issues/922#issuecomment-1184833720 and here: https://github.com/pytorch/TensorRT/issues/922#issuecomment-1157063427.

Describe the solution you'd like For now, in most cases it fails at the shape analysis phase since Torch-TensorRT cannot find the value for the missing input. We could introduce a pass to modify the graph and substitute the input by some constant or we can just add some mechanism to use the values from Params directly.

In the future Torch-TensorRT could handle these cases.

bowang007 avatar Jul 19 '22 23:07 bowang007