Skip to content

Conversation

@CaptainDuke
Copy link
Contributor

More than 50% acceleration would be achieved when reading compressed hdf5 files, using compiling optimization, and even more with large batch_size.
Besides, DT_UINT32 would be supported.

For compilation optimization flags, the default (-march=native) optimizes the generated code for your machine's CPU type. [see here](https://www.tensorflow.org/install/source#configuration_options)
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@CaptainDuke
Copy link
Contributor Author

I signed it!

@yongtang yongtang added the kokoro:run Kokoro CI label Jul 25, 2019
@kokoro-team kokoro-team removed the kokoro:run Kokoro CI label Jul 25, 2019
Copy link
Member

@yongtang yongtang left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the fix!

We already had some discussion about batch size and the overall column based data (e.g., Parquet, Feather, HDF5) pipeline in #366 (comment)

Previously the batch is a limitation of overall tf.data.Dataset pipeline where it generate each record one by one. This is not an issue for large records such as image files but is really slowing down everything when each record is say one integer or one float32.

We added batch concept in tensorflow-io to speed up. But we were using the same batch as tf.keras which actually have different concept (number of sample).

My way of thinking is that we may want to

read and process as much as possible in one chunk of big memory, if not the whole file

for each "batch process" in tf.data pipeline, then rebatch() to align tf.keras' batch if needed.

That likely needs some change in the overall tf.data pipeline (or move much of the logic out of tf.data pipeline). With TF 2.0 I think the effort will be smaller.

/cc @BryanCutler

@yongtang yongtang merged commit 17c30f9 into tensorflow:master Jul 25, 2019
@CaptainDuke
Copy link
Contributor Author

LGTM. Thanks for the fix!

We already had some discussion about batch size and the overall column based data (e.g., Parquet, Feather, HDF5) pipeline in #366 (comment)

Previously the batch is a limitation of overall tf.data.Dataset pipeline where it generate each record one by one. This is not an issue for large records such as image files but is really slowing down everything when each record is say one integer or one float32.

We added batch concept in tensorflow-io to speed up. But we were using the same batch as tf.keras which actually have different concept (number of sample).

My way of thinking is that we may want to

read and process as much as possible in one chunk of big memory, if not the whole file

for each "batch process" in tf.data pipeline, then rebatch() to align tf.keras' batch if needed.

That likely needs some change in the overall tf.data pipeline (or move much of the logic out of tf.data pipeline). With TF 2.0 I think the effort will be smaller.

/cc @BryanCutler

Thanks for your review and detailed reply!

i-ony pushed a commit to i-ony/io that referenced this pull request Feb 8, 2021
…nsorflow#379)

* Update README.md

* Update with compiling optimization

For compilation optimization flags, the default (-march=native) optimizes the generated code for your machine's CPU type. [see here](https://www.tensorflow.org/install/source#configuration_options)

* add DT_UINT32 support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants