tensorflow/compiler/xla/tests/tuple_test.cc
// Tests a tuple made of scalar constants.
Tests a tuple made of scalar constants.
Tests a tuple made of scalar constants .
XLA_TEST_F(TupleTest, TupleScalarConstant) {
  XlaBuilder builder(TestName());
  const float constant_scalar1 = 7.3f;
  const float constant_scalar2 = 1.2f;
  auto value = LiteralUtil::MakeTupleFromSlices(
      {LiteralUtil::CreateR0<float>(constant_scalar1),
       LiteralUtil::CreateR0<float>(constant_scalar2)});
  ConstantLiteral(&builder, value);
  ComputeAndCompareTuple(&builder, value, {}, error_spec_);
}
XLA_TEST_F ( TupleTest , TupleScalarConstant ) { XlaBuilder builder ( TestName ( ) ) ; const float constant_scalar1 = 7.3f ; const float constant_scalar2 = 1.2f ; auto value = LiteralUtil :: MakeTupleFromSlices ( { LiteralUtil :: CreateR0 < float > ( constant_scalar1 ) , LiteralUtil :: CreateR0 < float > ( constant_scalar2 ) } ) ; ConstantLiteral ( & builder , value ) ; ComputeAndCompareTuple ( & builder , value , { } , error_spec_ ) ; }
Tests a tuple made of scalar constants.
Tests a tuple made of scalar constants .