Skip to content

[TF-TRT] Enable INT8 calibration for use_implicit_batch=false when there is no dynamic shape inputs - #48244

Merged
copybara-service[bot] merged 1 commit into
tensorflow:masterfrom
DEKHTIARJonathan:jdekhtiar/calib_implicit_batch
Jun 10, 2021
Merged

copybara-service[bot] merged 1 commit into
tensorflow:masterfrom
DEKHTIARJonathan:jdekhtiar/calib_implicit_batch

Conversation

@DEKHTIARJonathan

@DEKHTIARJonathan DEKHTIARJonathan commented Apr 1, 2021 •

Copy link
Copy Markdown
Contributor

@tfeher @bixia1
Previously we disable INT8 calibration when use_implicit_batch=false. This PR partially enable INT8 calibration for use_implicit_batch=false, that is, when the engine has only static input shapes.

@google-ml-butler google-ml-butler Bot added the size:S CL Change Size: Small label Apr 1, 2021
@google-ml-butler
google-ml-butler Bot requested a review from joker-eph April 1, 2021 21:36
@google-cla google-cla Bot added the cla: yes label Apr 1, 2021
Comment on lines +505 to +509

if (has_dynamic_shape_input_ && !use_implicit_batch_) {
OP_REQUIRES(context, !calibration_mode_,
errors::InvalidArgument(
"Dynamic shape mode does not support calibration"));
}

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.

This change doesn't seem to match the description of this PR "Re-enable INT8 calibration with implicit batch mode".
IIUC, the PR description should be "Enable INT8 calibration for use_implicit_batch=false when there is no dynamic shape inputs".
And the detail description of the PR is "Previously we disable INT8 calibration when use_implicit_batch=false. This PR partially enable INT8 calibration for use_implicit_batch=false, that is, when the engine has only static input shapes."

@gbaned gbaned added the comp:gpu:tensorrt Issues specific to TensorRT label Apr 8, 2021
@gbaned

gbaned commented Apr 8, 2021

Copy link
Copy Markdown
Contributor

@DEKHTIARJonathan Can you please check @bixia1s comments and keep us posted ? Thanks!

@gbaned gbaned added the stat:awaiting response Status - Awaiting response from author label Apr 8, 2021
@gbaned

gbaned commented Apr 22, 2021

Copy link
Copy Markdown
Contributor

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

@DEKHTIARJonathan

Copy link
Copy Markdown
Contributor Author

Still under work, please do not close

@DEKHTIARJonathan DEKHTIARJonathan changed the title [TF-TRT] Re-enable INT8 calibration with implicit batch mode [TF-TRT] Enable INT8 calibration for use_implicit_batch=false when there is no dynamic shape inputs Jun 7, 2021
@DEKHTIARJonathan

Copy link
Copy Markdown
Contributor Author

@bixia1 : sorry I totally forgot to update this PR.
I now applied all the changes you requested. Let me know if we need anything else

@google-ml-butler google-ml-butler Bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Jun 9, 2021
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Jun 9, 2021
@gbaned gbaned removed ready to pull PR ready for merge process stat:awaiting response Status - Awaiting response from author labels Jun 10, 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 Jun 10, 2021
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Jun 10, 2021
@copybara-service
copybara-service Bot merged commit 4b22652 into tensorflow:master Jun 10, 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:S CL Change Size: Small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants