From c4aee1fc95cfe29cdf67fca1973c7c047bc09ae6 Mon Sep 17 00:00:00 2001 From: Duke Wang Date: Thu, 25 Jul 2019 21:36:43 +0800 Subject: [PATCH 1/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9fcecafa2..97877350f 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,7 @@ $ docker run -it --rm --net=host -v ${PWD}:/v -w /v tfio-dev $ # In Docker, configure will install TensorFlow or use existing install $ ./configure.sh $ # Build TensorFlow I/O C++ -$ bazel build -s --verbose_failures //tensorflow_io/... +$ bazel build -c opt --copt=-match=native -s --verbose_failures //tensorflow_io/... $ # Run tests with PyTest, note: some tests require launching additional containers to run (see below) $ pytest tests/ $ # Build the TensorFlow I/O package From 102966cb44fdf4767a16765ed24283132cc84ba3 Mon Sep 17 00:00:00 2001 From: Duke Wang Date: Thu, 25 Jul 2019 21:43:10 +0800 Subject: [PATCH 2/3] 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) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 97877350f..6adcb4cfc 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ $ docker build -f dev/Dockerfile -t tfio-dev . $ docker run -it --rm --net=host -v ${PWD}:/v -w /v tfio-dev $ # In Docker, configure will install TensorFlow or use existing install $ ./configure.sh -$ # Build TensorFlow I/O C++ +$ # Build TensorFlow I/O C++. 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) $ bazel build -c opt --copt=-match=native -s --verbose_failures //tensorflow_io/... $ # Run tests with PyTest, note: some tests require launching additional containers to run (see below) $ pytest tests/ From 39a86f22ee374b4451ead359025d36374de35d53 Mon Sep 17 00:00:00 2001 From: Duke Wang Date: Thu, 25 Jul 2019 21:46:08 +0800 Subject: [PATCH 3/3] add DT_UINT32 support --- tensorflow_io/hdf5/kernels/hdf5_input.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tensorflow_io/hdf5/kernels/hdf5_input.cc b/tensorflow_io/hdf5/kernels/hdf5_input.cc index ff1a57032..c1a8a5769 100644 --- a/tensorflow_io/hdf5/kernels/hdf5_input.cc +++ b/tensorflow_io/hdf5/kernels/hdf5_input.cc @@ -105,7 +105,11 @@ class HDF5InputStream{ Tensor tensor(ctx->allocator({}), DT_INT32, shape); dataset_[i].read(tensor.flat().data(), H5::PredType::NATIVE_INT, memoryspace, dataspace_[i]); out_tensors->emplace_back(std::move(tensor)); - } else if (H5Tequal(native_type, H5T_NATIVE_LONG)) { + } else if (H5Tequal(native_type, H5T_NATIVE_UINT32)) { + Tensor tensor(ctx->allocator({}), DT_UINT32, shape); + dataset_[i].read(tensor.flat().data(), H5::PredType::NATIVE_UINT32, memoryspace, dataspace_[i]); + out_tensors->emplace_back(std::move(tensor)); + }else if (H5Tequal(native_type, H5T_NATIVE_LONG)) { Tensor tensor(ctx->allocator({}), DT_INT64, shape); dataset_[i].read(tensor.flat().data(), H5::PredType::NATIVE_LONG, memoryspace, dataspace_[i]); out_tensors->emplace_back(std::move(tensor));