Skip to content

TF-TRT implement Range and RangeOptimal optimization profile strategies - #48414

Merged
copybara-service[bot] merged 1 commit into
tensorflow:masterfrom
tfeher:trt_profile_strategies
May 13, 2021
Merged

copybara-service[bot] merged 1 commit into
tensorflow:masterfrom
tfeher:trt_profile_strategies

Conversation

@tfeher

@tfeher tfeher commented Apr 8, 2021

Copy link
Copy Markdown
Contributor

This PR implements Range and RangeOptimal optimization profile strategies for TF-TRT dynamic shape mode.

Tagging @bixia1 for review and @DEKHTIARJonathan for visibility.

Tracker: #45481

@google-ml-butler google-ml-butler Bot added the size:M CL Change Size: Medium label Apr 8, 2021
@google-ml-butler
google-ml-butler Bot requested a review from joker-eph April 8, 2021 17:51
@google-cla google-cla Bot added the cla: yes label Apr 8, 2021
@tfeher
tfeher force-pushed the trt_profile_strategies branch from a64a3d7 to 64432b8 Compare April 8, 2021 17:54
@bixia1
bixia1 self-requested a review April 8, 2021 20:19
for (int i = 1; i < collected_shapes.size(); i++) {
TF_RETURN_IF_ERROR(ShapeProfileBinaryOp(
min, collected_shapes[i], [](int a, int b) { return std::min(a, b); },
&min));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we replace the lambda with std::min?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not simply, it is overleaded and the lambda is used to resolve ambiguity. Alternatively, we could cast it to a function pointer if you prefer that solution.

@tfeher
tfeher force-pushed the trt_profile_strategies branch 2 times, most recently from f9c6902 to 7f9faf3 Compare April 8, 2021 22:57

@tfeher tfeher left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @bixia1 for the comments, I have addressed the issues.

for (int i = 1; i < collected_shapes.size(); i++) {
TF_RETURN_IF_ERROR(ShapeProfileBinaryOp(
min, collected_shapes[i], [](int a, int b) { return std::min(a, b); },
&min));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not simply, it is overleaded and the lambda is used to resolve ambiguity. Alternatively, we could cast it to a function pointer if you prefer that solution.

@gbaned gbaned self-assigned this Apr 9, 2021
@gbaned gbaned added the comp:gpu:tensorrt Issues specific to TensorRT label Apr 9, 2021
@google-ml-butler google-ml-butler Bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Apr 14, 2021
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Apr 14, 2021
@gbaned

gbaned commented Apr 22, 2021

Copy link
Copy Markdown
Contributor

@tfeher Can you please check @bixia1's comments and keep us posted ? Thanks!

@gbaned gbaned added stat:awaiting response Status - Awaiting response from author and removed ready to pull PR ready for merge process labels Apr 22, 2021
@gbaned

gbaned commented Apr 30, 2021

Copy link
Copy Markdown
Contributor

@tfeher Any update on this PR? Please. Thanks!

@tfeher
tfeher force-pushed the trt_profile_strategies branch from 7f9faf3 to ef46a8d Compare May 3, 2021 19:37

@tfeher tfeher left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, I have updated the PR to fix the issue with TRT5 compilation.

@gbaned
gbaned requested a review from bixia1 May 11, 2021 13:51
@gbaned gbaned added awaiting review Pull request awaiting review and removed stat:awaiting response Status - Awaiting response from author labels May 11, 2021
@google-ml-butler google-ml-butler Bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels May 12, 2021
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label May 12, 2021
@gbaned gbaned removed the awaiting review Pull request awaiting review label May 13, 2021
@copybara-service
copybara-service Bot merged commit 0ba9d68 into tensorflow:master May 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes comp:gpu:tensorrt Issues specific to TensorRT ready to pull PR ready for merge process size:M CL Change Size: Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants