message: Add local client execution test which uses infeed and outfeed.
diff: @@ -37,6 +37,7 @@ limitations under the License.
  #include "tensorflow/compiler/xla/tests/test_macros.h"
  #include "tensorflow/compiler/xla/tests/test_utils.h"
  #include "tensorflow/compiler/xla/xla_data.pb.h"
  +#include "tensorflow/core/platform/env.h"
  #include "tensorflow/core/platform/logging.h"
  #include "tensorflow/core/platform/stream_executor_no_cuda.h"
  #include "tensorflow/core/platform/test.h"
  @@ -859,6 +860,31 @@ XLA_TEST_F(LocalClientExecuteTest, ShapeBufferToLiteralConversion64bit) {
  Literal::CreateR0<int64>(123456789000LL).get()}));
  }
  +// TODO(b/34359662): Support infeed/outfeed on GPU and CPU parallel.
  +// 2017-10-18.
  +XLA_TEST_F(LocalClientExecuteTest,
  + DISABLED_ON_GPU(DISABLED_ON_CPU_PARALLEL(InfeedOutfeedTest))) {
  + ComputationBuilder builder(local_client_, TestName());
  + const Shape shape = ShapeUtil::MakeShape(F32, {3});
  + auto in = builder.Infeed(shape);
  + auto constant = builder.ConstantR1<float>({1.0f, 2.0f, 3.0f});
  + auto sum = builder.Add(in, constant);
  + builder.Outfeed(sum, shape, /*outfeed_config=*/"");
  +
  + std::unique_ptr<tensorflow::Thread> thread(
  + tensorflow::Env::Default()->StartThread(
  + tensorflow::ThreadOptions(), "execute_thread",
  + [&] { ExecuteLocallyOrDie(builder.Build().ValueOrDie(), {}); }));
  +
  + ASSERT_IS_OK(local_client_->TransferToInfeed(
  + *Literal::CreateR1<float>({-5.0, 123.0, 42.0})));
  +
  + TF_ASSERT_OK_AND_ASSIGN(std::unique_ptr<Literal> result,
  + local_client_->TransferFromOutfeed(&shape));
  +
  + LiteralTestUtil::ExpectR1Equal<float>({-4.0, 125.0, 45.0}, *result);
  +}
  +
  // Benchmark that measures the overhead of the LocalClient API when running a
  // trivial computation
  void BM_LocalClientOverhead(int num_iters) {
  