Skip to content

[TFTRT] Rename ParameterizedOpConverterTest classes with more descriptive names - #45587

Merged
copybara-service[bot] merged 1 commit into
tensorflow:masterfrom
DEKHTIARJonathan:jdekhtiar/dynamic_shape/renaming_test_name
Dec 12, 2020
Merged

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

Conversation

@DEKHTIARJonathan

@DEKHTIARJonathan DEKHTIARJonathan commented Dec 10, 2020 •

Copy link
Copy Markdown
Contributor

Rename the derived classes of ParameterizedOpConverterTestBase as follows for better readability:

OpConverterTest1 => OpConverter_FP32_Test
OpConverterTest2 => OpConverter_FP32_FP16_Test
OpConverterTest3 => OpConverter_FP32_FP16_INT32_Test

@google-ml-butler google-ml-butler Bot added the size:M CL Change Size: Medium label Dec 10, 2020
@google-ml-butler
google-ml-butler Bot requested a review from joker-eph December 10, 2020 23:05
@google-cla google-cla Bot added the cla: yes label Dec 10, 2020

@bixia1 bixia1 left a comment

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.

Looks good to me.
Just minor change to the PR subject and description because they will go to the commit message. Please don't forget the squash the commits into one as it will be ready for being approved.
(1) PR subject:
current: Renaming ParameterizedOpConverterTest classes to a more explicit name
suggested: Rename ParameterizedOpConverterTest classes with descriptive names

(2) suggested new PR description:
Rename the derived classes of ParameterizedOpConverterTestBase as follows for better readability:
OpConverterTest1 => OpConverterDynamicShape_FP32_Test
OpConverterTest2 => OpConverterDynamicShape_FP32_FP16_Test
OpConverterTest3 => OpConverterDynamicShape_FP32_FP16_INT8_Test

@bixia1 bixia1 left a comment

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.

When I think about this more, I think we should remove DynamicShape in the test name:
OpConverterTest1 => OpConverter_FP32_Test
OpConverterTest2 => OpConverter_FP32_FP16_Test
OpConverterTest3 => OpConverter_FP32_FP16_INT8_Test

Reason: the test template doesn't ensure that the test will test dynamic shape and the template can also support implicit batch test and explicit batch test. In particular ,for TRT5, we only instantiate implicit batch mode tests. For TRT7 we instantiate implicit batch mode tests, dynamic shape test and explicit batch mode tests.

@gbaned gbaned self-assigned this Dec 11, 2020
@gbaned gbaned added the comp:gpu:tensorrt Issues specific to TensorRT label Dec 11, 2020
@DEKHTIARJonathan

Copy link
Copy Markdown
Contributor Author

Sounds fair with me. @tfeher what do you think ? If you agree, I'll push Bixia's recommendation

@tfeher tfeher left a comment

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.

Thanks Jonathan for improving the naming conventions! I agree with Bixia's suggestion. There is one comment from my side, otherwise it looks good to me.

class OpConverterTest3 : public ParameterizedOpConverterTestBase {};
INSTANTIATE_TEST_CASE_P(
OpConvTestInstantiation3, OpConverterTest3,
OpConvTestInstantiation, OpConverterDynamicShape_FP32_FP16_INT8_Test,

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 should have suffix _FP32_FP16_INT32 (see two lines below). This is meant for ops that can process shape (INT32) tensors.

INT8 mode we rarely test with the cpp unit tests. This is because we either need to set quantization ranges (as in #45599) or we would need calibration. Therefore INT8 testing is mostly done by the python integration test.

@DEKHTIARJonathan

Copy link
Copy Markdown
Contributor Author

I will take @tfeher and @bixia1 comments into account and resubmit. Expect the update today ;)

@DEKHTIARJonathan

Copy link
Copy Markdown
Contributor Author

@bixia1 @tfeher updated as asked. We should be good to merge

@bixia1

bixia1 commented Dec 12, 2020

Copy link
Copy Markdown
Contributor

You missed the first comment in #45587 (review). I will try to make this change myself.

@bixia1 bixia1 changed the title [TFTRT] Renaming ParameterizedOpConverterTest classes to a more explicit name [TFTRT] Rename ParameterizedOpConverterTest classes with descriptive names Dec 12, 2020
@bixia1 bixia1 changed the title [TFTRT] Rename ParameterizedOpConverterTest classes with descriptive names [TFTRT] Rename ParameterizedOpConverterTest classes with more descriptive names Dec 12, 2020
@google-ml-butler google-ml-butler Bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Dec 12, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Dec 12, 2020
@copybara-service
copybara-service Bot merged commit f805574 into tensorflow:master Dec 12, 2020
@DEKHTIARJonathan
DEKHTIARJonathan deleted the jdekhtiar/dynamic_shape/renaming_test_name branch December 12, 2020 00:57
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.

5 participants