Repository navigation
Conversation
|
Update: this message was intended for the discussion of #36080, I have also added this comment there. Here is a list of PRs related to After these |
bixia1
left a comment
There was a problem hiding this comment.
Thanks for the work! Looks good to me, I only have some minor comments.
bixia1
left a comment
There was a problem hiding this comment.
I only see some minor formatting issue, which will hopefully be automatically fixed when the code is imported to google3.
PiperOrigin-RevId: 293412014 Change-Id: I5a0852d415b149e2e39a2e41eb953ad1c8b911d2
|
Seems auto-merge is not happening but the changes are now committed so we can close this. Thank you for the PR. |
This PR adds a new experimental feature to TF-TRT: explicit batch mode. Explicit batch mode is the first step on the way to enable dynamic shapes in TF-TRT (PR #36080).
The main advantage of explicit batch mode is the following: the batch dimension is not a special dimension in this mode, which means a single TRT network can have layers with different batch sizes and more importantly operators can manipulate the batch dimension. A unit test demonstrates this for the squeeze op.
Currently not all TF-TRT ops support explicit batch mode, it is expected to use this feature for elementwise ops. We are soon going to enable all the existing converters to work with this feature.
Currently this feature does not support INT8 calibration.
This feature is not supposed to change any of the existing behavior of TF-TRT in any of the various modes.
The ground work for this PR was already laid down by @pooyadavoodi in PR #34293. The current PR:
To turn on this experimental feature, one has to use a rewriter config. Here is an example how to do it:
Tagging @bixia1 for review.