Replies: 5 comments 3 replies
-
However, the above case of object detection would also cause error even if it is static shape analysis. As long as fallback is needed and some input shapes of certain subgraphs are data-dependent, shape analysis (whether it is static or dynamic) is intractable. |
Beta Was this translation helpful? Give feedback.
-
Data-dependent shapes is a different issue and really falls on TRT itself. They are adding in the future (can confirm internally). We should assume data-independence to start |
Beta Was this translation helpful? Give feedback.
-
@dheerajperi please modify the original content with a precise description of the current approach (min-opt-max) as well as the known limitations of this stage. Agreed updated 7/14. |
Beta Was this translation helpful? Give feedback.
-
IMO we should start with dynamic batch, this seems like a high impact good start |
Beta Was this translation helpful? Give feedback.
-
New RFC here |
Beta Was this translation helpful? Give feedback.
-
Previously, when encountered ops/modules that have to fall back and meanwhile dynamic shape is used, shape analysis would fail when doing
generateRandomInputs()
, because tensors with-1
contained in shape cannot be created.To support dynamic fallback, we have to firstly overcome this failure, by doing
generateRandomInputs()
with min/max/opt shape info. Then shape analysis can be executed three times, with min/max/opt shapes correspondingly.Such a solution can cover most of user cases, only if the input shapes of subgraphs are determined by the input shape of whole graph. However, in some cases such as Object Detection where input shapes of subgraphs may be data-dependent and variable even if input shapes of whole graph is fixed, such a solution would fail.
For failure cases, we need to 1. detect such cases and make error messages easy to understand. 2. If undetectable, at least some warning messages should be given when dynamic fallback is encountered.
Beta Was this translation helpful? Give feedback.
All reactions