Replies: 4 comments
-
@bowang007 Can you add estimates of effort and phases to this? See this: https://github.com/pytorch/TensorRT/wiki/RFC-Template |
Beta Was this translation helpful? Give feedback.
0 replies
-
@bowang007 is this for TS, FX or both? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
https://forums.developer.nvidia.com/t/data-dependent-tensor-shapes-in-tensorrt/194988 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
TL;DR
TensorRT 8.5 supports dynamically shaped output feature, this helps support cases that shapes depend on input data. We should integrate this new feature.
Goal(s)
Allow users to use data dependent shapes in their model. Currently models which depend on input data are producing incorrect results when they are converted to TRT engine.
Usecases
Proposed APIs/UX
Users might need to specify that the model uses data dependent shapes since TensorRT now needs to explicitly use
IExecutionContext::getTensorShape()
for dimensions of the output if they are computable from the dimensions of inputs, or even useIOutputAllocator
otherwise.It's also possible that TorchTRT introduces some kind of mechanism which could detect if the output shape is dependent on input data automatically. In this case, there won't be any APIs/UX changes.
Internal Implementation
Design
From the first glance it seems that we need to use
IExecutionContext::getTensorShape()
orIOutputAllocator
for different scenarios. Specifically, these APIs might need to be explicitly used when constructing the TensorRT network. However, I didn't find any examples about how these APIs can actually be used in TensorRT.Beta Was this translation helpful? Give feedback.
All reactions