Skip to content

TF-TRT SpaceToDepth and DepthToSpace op converters for dynamic shape mode. - #47590

Merged
copybara-service[bot] merged 1 commit into
tensorflow:masterfrom
tfeher:trt_depthspaceshuffle_dynamic
Mar 23, 2021
Merged

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

Conversation

@tfeher

@tfeher tfeher commented Mar 5, 2021

Copy link
Copy Markdown
Contributor

This PR updates the converter for the SpaceToDepth and DepthToSpace ops to work with explicit batch and dynamic shape mode.

While the explicit batch converter needs only a slight modification to insert the batch dim, the dynamic shape converter has to redefine the same target shape calculation using TRT shape tensor arithmetic.

The unit test are updated to run all three trt modes. The parameters are not modified, just refactored to allow execution in all trt modes.

Tagging @bixia1 for review and @DEKHTIARJonathan for visibility.

Tracker: #45481

@google-ml-butler google-ml-butler Bot added the size:XL CL Change Size:Extra Large label Mar 5, 2021
@google-ml-butler
google-ml-butler Bot requested a review from joker-eph March 5, 2021 13:08
@google-cla google-cla Bot added the cla: yes label Mar 5, 2021
@gbaned gbaned self-assigned this Mar 5, 2021
@gbaned gbaned added the comp:gpu:tensorrt Issues specific to TensorRT label Mar 5, 2021
@tfeher
tfeher force-pushed the trt_depthspaceshuffle_dynamic branch from cdc9d9e to 4749454 Compare March 14, 2021 23:49
@bixia1
bixia1 self-requested a review March 18, 2021 21:06
@tfeher
tfeher force-pushed the trt_depthspaceshuffle_dynamic branch from 4749454 to 026b878 Compare March 21, 2021 12:41

@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 review, I have addressed the issues.

@gbaned
gbaned requested a review from bixia1 March 21, 2021 16:11
@tfeher
tfeher force-pushed the trt_depthspaceshuffle_dynamic branch from 026b878 to 2b283d8 Compare March 22, 2021 22:42

@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 review, I have addressed the issues!

@bixia1

bixia1 commented Mar 22, 2021

Copy link
Copy Markdown
Contributor

#47590 (comment)

Prefer using return values over output parameters: they improve readability, and often provide the same or better performance

@google-ml-butler google-ml-butler Bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Mar 22, 2021
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Mar 22, 2021
@copybara-service
copybara-service Bot merged commit f3dd905 into tensorflow:master Mar 23, 2021
@tfeher
tfeher deleted the trt_depthspaceshuffle_dynamic branch May 16, 2022 08:46
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:XL CL Change Size:Extra Large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants