tensorflow/compiler/xla/tests/tuple_test.cc
// Trivial test for extracting a tuple element with GetTupleElement.
Trivial test for extracting a tuple element with GetTupleElement.
Trivial test for extracting a tuple element with GetTupleElement .
XLA_TEST_F(TupleTest, GetTupleElementWithZeroElements) {
  XlaBuilder builder(TestName());
  auto tuple_data =
      Tuple(&builder,
            {ConstantR1<float>(&builder, {}),
             ConstantR2FromArray2D<float>(&builder, Array2D<float>(0, 101))});
  GetTupleElement(tuple_data, 1);
  ComputeAndCompareR2<float>(&builder, Array2D<float>(0, 101), {}, error_spec_);
}
XLA_TEST_F ( TupleTest , GetTupleElementWithZeroElements ) { XlaBuilder builder ( TestName ( ) ) ; auto tuple_data = Tuple ( & builder , { ConstantR1 < float > ( & builder , { } ) , ConstantR2FromArray2D < float > ( & builder , Array2D < float > ( 0 , 101 ) ) } ) ; GetTupleElement ( tuple_data , 1 ) ; ComputeAndCompareR2 < float > ( & builder , Array2D < float > ( 0 , 101 ) , { } , error_spec_ ) ; }
Trivial test for extracting a tuple element with GetTupleElement.
Trivial test for extracting a tuple element with GetTupleElement .