Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move tf.cast to tf.float16 in input pipeline #5253

Merged
merged 2 commits into from
Sep 5, 2018

Conversation

tfboyd
Copy link
Member

@tfboyd tfboyd commented Sep 5, 2018

Moves the tf.cast for tf.float16 to the input pipeline which is run on cpu and pipelined. This seemed to have a consistent ~50 images/sec boost on 8xV100 FP16 with real imagenet data, which is a small 1% gain and logical.

FYI, tf.image.per_image_standardization(image) Returns tf.float32 even if passed a tf.float16 tensor thus the cast to tf.float16 must be done after preprocessing.

@tfboyd tfboyd requested a review from robieta September 5, 2018 21:29
@tfboyd tfboyd requested review from karmel and a team as code owners September 5, 2018 21:29
Copy link
Contributor

@robieta robieta left a comment

Choose a reason for hiding this comment

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

LGTM

@robieta
Copy link
Contributor

robieta commented Sep 5, 2018

Ah, looks like the cifar test needs to be updated.

@tfboyd
Copy link
Member Author

tfboyd commented Sep 5, 2018

No problem, I thought I ran all the tests but I keep jumping around. Fixing ASAP.

@tfboyd tfboyd merged commit 7b30467 into tensorflow:master Sep 5, 2018
@tfboyd tfboyd deleted the resnet_input_pipeline_fp16 branch January 12, 2019 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants