/external/tensorflow/tensorflow/compiler/xla/tests/ |
D | scatter_test.cc | 66 LiteralUtil::CreateR2<int32>({{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}); in XLA_TEST_F() 67 Literal scatter_indices = LiteralUtil::CreateR1<int32>({0, 2}); in XLA_TEST_F() 68 Literal updates = LiteralUtil::CreateR2<int32>({{10, 20, 30}, {70, 80, 90}}); in XLA_TEST_F() 97 LiteralUtil::CreateR2<int32>({{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}); in XLA_TEST_F() 98 Literal scatter_indices = LiteralUtil::CreateR1<int32>({0, 1}); in XLA_TEST_F() 99 Literal updates = LiteralUtil::CreateR2<int32>({{10, 20, 30}, {70, 80, 90}}); in XLA_TEST_F() 125 LiteralUtil::CreateR2<int32>({{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}); in XLA_TEST_F() 126 Literal scatter_indices = LiteralUtil::CreateR1<int32>({0, 2}); in XLA_TEST_F() 128 LiteralUtil::CreateR2<int32>({{10, 30}, {40, 60}, {70, 90}}); in XLA_TEST_F() 157 LiteralUtil::CreateR2<int32>({{1, 3, 2, 0}, {3, 0, 2, 1}, {2, 3, 1, 0}}); in XLA_TEST_F() [all …]
|
D | gather_operation_test.cc | 62 LiteralUtil::CreateR2<int32>({{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}); in XLA_TEST_F() 63 Literal start_indices = LiteralUtil::CreateR1<int32>({0, 2}); in XLA_TEST_F() 83 LiteralUtil::CreateR2<int32>({{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}); in XLA_TEST_F() 84 Literal start_indices = LiteralUtil::CreateR1<int32>({0, 2}); in XLA_TEST_F() 104 LiteralUtil::CreateR2<int32>({{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}); in XLA_TEST_F() 105 Literal start_indices = LiteralUtil::CreateR2<int32>({{0, 2}, {2, 1}}); in XLA_TEST_F() 125 LiteralUtil::CreateR2<int32>({{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}); in XLA_TEST_F() 127 LiteralUtil::CreateR3<int32>({{{0, 2}, {2, 1}}, {{1, 2}, {2, 0}}}); in XLA_TEST_F() 147 LiteralUtil::CreateR2<int32>({{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}); in XLA_TEST_F() 149 LiteralUtil::CreateR3<int32>({{{0, 2}, {2, 1}}, {{1, 2}, {2, 0}}}); in XLA_TEST_F() [all …]
|
D | round_trip_transfer_test.cc | 48 RoundTripTest(LiteralUtil::CreateR0<int32>(42)); in TEST_F() 52 RoundTripTest(LiteralUtil::CreateR0<float>(42.0)); in TEST_F() 56 RoundTripTest(LiteralUtil::CreateR1<float>({})); in TEST_F() 60 RoundTripTest(LiteralUtil::CreateR1<float>({42.0, 64.0})); in TEST_F() 66 RoundTripTest(LiteralUtil::CreateR1<float>(values)); in TEST_F() 72 RoundTripTest(LiteralUtil::CreateR1<float>(values)); in TEST_F() 78 RoundTripTest(LiteralUtil::CreateR1<float>(values)); in TEST_F() 84 RoundTripTest(LiteralUtil::CreateR1<float>(values)); in TEST_F() 88 RoundTripTest(LiteralUtil::CreateR2FromArray2D<float>(Array2D<float>(10, 0))); in TEST_F() 92 RoundTripTest(LiteralUtil::CreateR2<float>({{42.0, 64.0}, {77.0, 88.0}})); in TEST_F() [all …]
|
D | multioutput_fusion_test.cc | 72 HloInstruction::CreateConstant(LiteralUtil::CreateR0<float>(8.0f))); in RunTest2D() 117 Literal literal_r0 = LiteralUtil::CreateR0<float>(-9.0f); in RunTest2D() 181 Literal expect = LiteralUtil::CreateR1<float>({size * 1.5f * 3.5f}); in RunTest1D() 212 auto param = LiteralUtil::MakeTupleOwned( in XLA_TEST_F() 213 LiteralUtil::MakeTupleOwned( in XLA_TEST_F() 214 LiteralUtil::MakeTupleOwned(LiteralUtil::CreateR0<int32>(42)), in XLA_TEST_F() 215 LiteralUtil::CreateR0<float>(1.0)), in XLA_TEST_F() 216 LiteralUtil::MakeTupleOwned(LiteralUtil::CreateR0<float>(3.0), in XLA_TEST_F() 217 LiteralUtil::CreateR0<int32>(4))); in XLA_TEST_F() 220 LiteralUtil::MakeTupleOwned(LiteralUtil::CreateR0<int32>(42)), result)); in XLA_TEST_F() [all …]
|
D | reshape_test.cc | 58 auto input_literal = LiteralUtil::CreateR2FromArray2D(input_array); in XLA_TEST_P() 64 auto expected_literal = LiteralUtil::CreateR1<float>({1.0f}); in XLA_TEST_P() 71 auto input_literal = LiteralUtil::CreateR1<float>({1.0f}); in XLA_TEST_P() 77 auto expected_literal = LiteralUtil::CreateR1<float>({1.0f}); in XLA_TEST_P() 84 auto input_literal = LiteralUtil::CreateR1<float>({1.0f}); in XLA_TEST_P() 90 auto expected_literal = LiteralUtil::CreateR1<float>({1.0f}); in XLA_TEST_P() 100 auto input_literal = LiteralUtil::CreateR2FromArray2D(input_array); in XLA_TEST_P() 108 auto expected_literal = LiteralUtil::CreateR0<float>(1.0f); in XLA_TEST_P() 116 Literal param0_literal = LiteralUtil::CreateR0<float>(1.0f); in XLA_TEST_P() 123 auto expected_literal = LiteralUtil::CreateR1<float>({-1.0f}); in XLA_TEST_P() [all …]
|
D | tuple_test.cc | 54 auto value = LiteralUtil::MakeTupleFromSlices( in XLA_TEST_F() 55 {LiteralUtil::CreateR0<float>(constant_scalar), in XLA_TEST_F() 56 LiteralUtil::CreateR1<float>(constant_vector), in XLA_TEST_F() 57 LiteralUtil::CreateR2<float>(constant_matrix)}); in XLA_TEST_F() 69 auto value = LiteralUtil::MakeTupleFromSlices( in XLA_TEST_F() 70 {LiteralUtil::CreateR0<float>(constant_scalar1), in XLA_TEST_F() 71 LiteralUtil::CreateR0<float>(constant_scalar2)}); in XLA_TEST_F() 91 auto expected = LiteralUtil::MakeTupleFromSlices( in XLA_TEST_F() 92 {LiteralUtil::CreateR0<float>(constant_scalar), in XLA_TEST_F() 93 LiteralUtil::CreateR1<float>(constant_vector), in XLA_TEST_F() [all …]
|
D | transfer_manager_test.cc | 72 Literal literal = LiteralUtil::CreateR0<uint32>(42); in XLA_TEST_F() 88 LiteralUtil::CreateR1<float>({1.25f, 2.5f, -17.0f, -20.125f}); in XLA_TEST_F() 106 Literal literal = LiteralUtil::CreateR1<float>(test_vector); in XLA_TEST_F() 122 Literal literal = LiteralUtil::CreateR1U8(test_string); in XLA_TEST_F() 138 LiteralUtil::CreateR2<float>({{1.0f, 2.0f, 3.0f}, {4.0f, 5.0f, 6.0f}}); in XLA_TEST_F() 155 Literal literal = LiteralUtil::CreateR2WithLayout<float>( in XLA_TEST_F() 176 Literal literal = LiteralUtil::MakeTupleFromSlices( in XLA_TEST_F() 177 {LiteralUtil::CreateR0<float>(123.0f), in XLA_TEST_F() 178 LiteralUtil::CreateR2<float>({{1.0f, 2.0f}, {4.0f, 5.0f}}), in XLA_TEST_F() 179 LiteralUtil::CreateR1<float>({44.0f, -10.0f, 3333333.3f})}); in XLA_TEST_F() [all …]
|
D | literal_test_util_test.cc | 34 Literal literal = LiteralUtil::MakeTupleFromSlices({ in TEST() 35 LiteralUtil::CreateR0<int32>(42), in TEST() 36 LiteralUtil::CreateR0<int32>(64), in TEST() 46 Literal lhs = LiteralUtil::MakeTupleFromSlices({ in TEST() 47 LiteralUtil::CreateR0<int32>(42), in TEST() 48 LiteralUtil::CreateR0<int32>(64), in TEST() 50 Literal rhs = LiteralUtil::MakeTupleFromSlices({ in TEST() 51 LiteralUtil::CreateR0<int32>(64), in TEST() 52 LiteralUtil::CreateR0<int32>(42), in TEST() 61 auto two = LiteralUtil::CreateR0<float>(2); in TEST() [all …]
|
D | broadcast_test.cc | 40 HloInstruction::CreateConstant(LiteralUtil::CreateR0<float>(42.0))); in XLA_TEST_F() 49 EXPECT_TRUE(LiteralTestUtil::Near(LiteralUtil::CreateR0<float>(42.0), result, in XLA_TEST_F() 56 HloInstruction::CreateConstant(LiteralUtil::CreateR0<float>(42.0))); in XLA_TEST_F() 66 LiteralUtil::CreateR2<float>({{42.0, 42.0}, {42.0, 42.0}}), result, in XLA_TEST_F() 73 LiteralUtil::CreateR1<float>({1.0, 2.0, 3.0}))); in XLA_TEST_F() 89 LiteralUtil::CreateR2<float>({{1.0, 1.0}, {2.0, 2.0}, {3.0, 3.0}}), in XLA_TEST_F() 93 LiteralUtil::CreateR2<float>({{1.0, 2.0, 3.0}, {1.0, 2.0, 3.0}}), in XLA_TEST_F() 100 LiteralUtil::CreateR2<float>({{1.0, 2.0}, {3.0, 4.0}}))); in XLA_TEST_F() 110 LiteralUtil::CreateR2<float>({{1.0, 2.0}, {3.0, 4.0}}), result, in XLA_TEST_F() 119 LiteralUtil::CreateR2<float>({{1.0, 2.0}, {3.0, 4.0}}))); in XLA_TEST_F() [all …]
|
D | local_client_execute_test.cc | 71 auto x_value = LiteralToShapedBuffer(LiteralUtil::CreateR0<float>(42.0f)); in XLA_TEST_F() 84 auto x_array = LiteralToShapedBuffer(LiteralUtil::CreateR1<float>({})); in XLA_TEST_F() 98 LiteralToShapedBuffer(LiteralUtil::CreateR1<float>({0.0f, 1.0f, 2.0f})); in XLA_TEST_F() 112 LiteralToShapedBuffer(LiteralUtil::CreateR1<float>({0.0f, 1.0f, 2.0f})); in XLA_TEST_F() 131 auto x_array = LiteralToShapedBuffer(LiteralUtil::CreateR2WithLayout( in XLA_TEST_F() 137 auto y_array = LiteralToShapedBuffer(LiteralUtil::CreateR2WithLayout( in XLA_TEST_F() 164 LiteralUtil::CreateR2<float>({{1.0f, 2.0f}, {3.0f, 4.0f}})); in XLA_TEST_F() 166 LiteralUtil::CreateR2<float>({{10.0f, 20.0f}, {30.0f, 40.0f}})); in XLA_TEST_F() 201 LiteralUtil::CreateR2<float>({{1.0f, 2.0f}, {3.0f, 4.0f}})); in XLA_TEST_F() 203 LiteralUtil::CreateR2<float>({{10.0f, 20.0f}, {30.0f, 40.0f}})); in XLA_TEST_F() [all …]
|
D | fusion_test.cc | 99 LiteralUtil::CreateR2FromArray2D(operand_data[i]))); in TestElementwise2D() 130 auto expected = LiteralUtil::CreateR2FromArray2D(answer_data); in TestElementwise2D() 204 LiteralUtil::CreateR2<float>({{1.0}, {2.0}, {3.0}}))); in XLA_TEST_F() 206 LiteralUtil::CreateR2<float>({{-1.0}, {-1.0}, {-1.0}}))); in XLA_TEST_F() 212 LiteralUtil::CreateR2<float>({{1.62, 2.72, 3.14}}))); in XLA_TEST_F() 216 LiteralUtil::CreateR2<float>({{1.0, 1.0, 1.0}, {0.0, 0.0, 0.0}}))); in XLA_TEST_F() 222 LiteralUtil::CreateR2<float>({{0.5, 0.5, 0.5}, {0.5, 0.5, 0.5}}))); in XLA_TEST_F() 224 HloInstruction::CreateConstant(LiteralUtil::CreateR2<bool>( in XLA_TEST_F() 241 LiteralUtil::CreateR2<float>({{0.5}, {2.72}}), in XLA_TEST_F() 252 LiteralUtil::CreateR2<float>({{1.0, 2.0, 3.0}}))); in XLA_TEST_F() [all …]
|
D | broadcast_simple_test.cc | 63 auto r3_data = LiteralUtil::CreateR3FromArray3D(*r3_array).Relayout( in MakeR3Data() 77 auto r2_data = LiteralUtil::CreateR2FromArray2D(*r2_array).Relayout( in MakeR2Data() 293 ConstantLiteral(&b, LiteralUtil::CreateR3<float>( in XLA_TEST_F() 298 LiteralUtil::CreateR3<float>({{{3.0, 7.0}, {4.0, 8.0}, {5.0, 9.0}}, in XLA_TEST_F() 368 auto expected = LiteralUtil::CreateR3FromArray3D(expected_array); in XLA_TEST_P() 392 LiteralUtil::CreateR3<float>({{{2, 3}, {4, 5}}, {{7, 8}, {9, 10}}}); in XLA_TEST_F() 400 auto r1 = ConstantLiteral(&b, LiteralUtil::CreateR3<float>({{{1, 2}}})); in XLA_TEST_F() 402 &b, LiteralUtil::CreateR3<float>({{{1, 2}, {3, 4}}, {{5, 6}, {7, 8}}})); in XLA_TEST_F() 406 LiteralUtil::CreateR3<float>({{{2, 4}, {4, 6}}, {{6, 8}, {8, 10}}}); in XLA_TEST_F() 413 auto r1 = ConstantLiteral(&b, LiteralUtil::CreateR3<float>({{{1}, {2}}})); in XLA_TEST_F() [all …]
|
D | token_hlo_test.cc | 39 EXPECT_TRUE(LiteralTestUtil::Equal(result, LiteralUtil::CreateToken())); in XLA_TEST_F() 51 Literal token_literal = LiteralUtil::CreateToken(); in XLA_TEST_F() 53 LiteralTestUtil::Equal(result, LiteralUtil::MakeTuple({&token_literal}))); in XLA_TEST_F() 68 EXPECT_TRUE(LiteralTestUtil::Equal(result, LiteralUtil::CreateToken())); in XLA_TEST_F() 79 HloInstruction::CreateConstant(LiteralUtil::CreateR0<int32>(42))); in XLA_TEST_F() 188 auto arg = LiteralUtil::CreateR0<bool>(true); in XLA_TEST_F() 198 auto arg = LiteralUtil::CreateR0<bool>(false); in XLA_TEST_F() 226 auto p0 = LiteralUtil::CreateR0<float>(10.0); in XLA_TEST_F() 227 auto p1 = LiteralUtil::CreateR0<float>(3.0); in XLA_TEST_F() 228 auto expected = LiteralUtil::CreateR0<float>(-156.0); in XLA_TEST_F() [all …]
|
D | reduce_window_test.cc | 76 auto init = CreateConstantFromLiteral(LiteralUtil::CreateR0<float>(0.0f), in ReduceWindowAdd() 88 CreateConstantFromLiteral(LiteralUtil::MinValue(F32), &builder_); in ReduceWindowMax() 99 CreateConstantFromLiteral(LiteralUtil::MaxValue(F32), &builder_); in ReduceWindowMin() 110 LiteralUtil::CreateR1<float>({1, 1, 1, 1}), &builder_); in TEST_P() 112 CreateConstantFromLiteral(LiteralUtil::CreateR0<float>(0), &builder_); in TEST_P() 127 CreateConstantFromLiteral(LiteralUtil::CreateR0<float>(42.0), &builder_); in TEST_P() 129 CreateConstantFromLiteral(LiteralUtil::CreateR0<float>(1.0), &builder_); in TEST_P() 133 ComputeAndCompareLiteral(&builder_, LiteralUtil::CreateR0<float>(43.0), {}, in TEST_P() 139 LiteralUtil::CreateR1<float>({10000, 1000, 100, 10, 1}), &builder_); in TEST_P() 141 ComputeAndCompareLiteral(&builder_, LiteralUtil::CreateR1<float>({100, 1}), in TEST_P() [all …]
|
D | batch_normalization_test.cc | 66 input_literal_ = LiteralUtil::CreateR4FromArray4D(input_array_); in BatchNormalizationTest() 245 auto expected = LiteralUtil::MakeTupleFromSlices( in XLA_TEST_P() 246 {LiteralUtil::CreateR4<float>({{{{-1.6f, -2.0f}}, {{0.1f, 0.6f}}}, in XLA_TEST_P() 248 LiteralUtil::CreateR1<float>({4, 5}), in XLA_TEST_P() 249 LiteralUtil::CreateR1<float>({5, 5})}); in XLA_TEST_P() 269 auto expected = LiteralUtil::MakeTupleFromSlices( in XLA_TEST_P() 270 {LiteralUtil::CreateR4<float>({{{{-1.6f}, {-2.0f}}, {{0.1f}, {0.6f}}}, in XLA_TEST_P() 272 LiteralUtil::CreateR1<float>({4, 5}), in XLA_TEST_P() 273 LiteralUtil::CreateR1<float>({5, 5})}); in XLA_TEST_P() 299 auto expected = LiteralUtil::MakeTupleFromSlices( in XLA_TEST_P() [all …]
|
D | params_test.cc | 45 Literal param0_literal = LiteralUtil::CreateR0<float>(3.14159f); in XLA_TEST_F() 57 Literal param0_literal = LiteralUtil::CreateR1<float>({}); in XLA_TEST_F() 69 Literal param0_literal = LiteralUtil::CreateR1<float>({3.14f, -100.25f}); in XLA_TEST_F() 82 Literal param0_literal = LiteralUtil::CreateR1U8(str); in XLA_TEST_F() 96 LiteralUtil::CreateR2FromArray2D<float>(Array2D<float>(3, 0)); in XLA_TEST_F() 108 Literal param0_literal = LiteralUtil::CreateR2<float>( in XLA_TEST_F() 124 Literal literal0 = LiteralUtil::CreateR1<float>({1, 2}); in XLA_TEST_F() 129 Literal literal1 = LiteralUtil::CreateR1<float>({10, 20}); in XLA_TEST_F() 155 Literal literal = LiteralUtil::CreateR0<float>(3.14159f); in XLA_TEST_F() 169 Literal literal0 = LiteralUtil::CreateR1<float>({1, 2}); in XLA_TEST_F() [all …]
|
D | convolution_test.cc | 133 {LiteralUtil::CreateFromArray(input_data), in RunTest() 134 LiteralUtil::CreateFromArray(filter_data)}, in RunTest() 167 {LiteralUtil::CreateFromArray(input_data), in RunTest() 168 LiteralUtil::CreateFromArray(filter_data)}, in RunTest() 202 {LiteralUtil::CreateFromArray(input_data), in RunTest() 203 LiteralUtil::CreateFromArray(filter_data)}, in RunTest() 234 {LiteralUtil::CreateFromArray(input_data), in RunTest() 235 LiteralUtil::CreateFromArray(filter_data)}, in RunTest() 259 client_->TransferToServer(LiteralUtil::CreateR3FromArray3D(input)) in XLA_TEST_F() 262 client_->TransferToServer(LiteralUtil::CreateR3FromArray3D(filter)) in XLA_TEST_F() [all …]
|
/external/tensorflow/tensorflow/compiler/xla/ |
D | literal_util.cc | 85 /* static */ Literal LiteralUtil::CreateFromDimensions( in CreateFromDimensions() 91 /* static */ Literal LiteralUtil::ConvertBF16ToF32( in ConvertBF16ToF32() 96 /* static */ Literal LiteralUtil::ConvertF32ToBF16( in ConvertF32ToBF16() 101 /* static */ Literal LiteralUtil::CreateToken() { in CreateToken() 105 /* static */ Literal LiteralUtil::Zero(PrimitiveType primitive_type) { in Zero() 108 return LiteralUtil::CreateR0<uint8>(0); in Zero() 110 return LiteralUtil::CreateR0<uint16>(0); in Zero() 112 return LiteralUtil::CreateR0<uint32>(0); in Zero() 114 return LiteralUtil::CreateR0<uint64>(0); in Zero() 116 return LiteralUtil::CreateR0<int8>(0); in Zero() [all …]
|
D | literal_test.cc | 82 LiteralUtil::CreateR4FromArray4DWithLayout<float>(arr4d, in LiteralUtilTest() 85 LiteralUtil::CreateR4FromArray4DWithLayout<float>(arr4d, in LiteralUtilTest() 100 auto true_lit = LiteralUtil::CreateR0<bool>(true); in TEST_F() 103 auto false_lit = LiteralUtil::CreateR0<bool>(false); in TEST_F() 106 auto u32_lit = LiteralUtil::CreateR0<uint32>(42); in TEST_F() 109 auto s32_lit = LiteralUtil::CreateR0<int32>(-999); in TEST_F() 112 auto f32_lit = LiteralUtil::CreateR0<float>(3.14f); in TEST_F() 115 auto f16_lit = LiteralUtil::CreateR0<half>(static_cast<half>(0.5f)); in TEST_F() 118 auto c64_lit = LiteralUtil::CreateR0<complex64>({3.14f, 2.78f}); in TEST_F() 121 auto c128_lit = LiteralUtil::CreateR0<complex128>({3.14f, 2.78f}); in TEST_F() [all …]
|
D | reference_util_test.cc | 56 auto actual_literal = LiteralUtil::CreateR2FromArray2D(*result); in TEST_F() 68 auto actual_literal = LiteralUtil::CreateR2FromArray2D(*result); in TEST_F() 76 auto actual_literal = LiteralUtil::CreateR1<float>(*result); in TEST_F() 84 auto actual_literal = LiteralUtil::CreateR1<float>(*result); in TEST_F() 90 auto result = LiteralUtil::CreateR1<float>(ReferenceUtil::Reduce4DTo1D( in TEST_F() 99 auto actual_literal = LiteralUtil::CreateR2FromArray2D(*result); in TEST_F() 109 auto actual_literal = LiteralUtil::CreateR2FromArray2D(*result); in TEST_F() 120 auto actual_literal = LiteralUtil::CreateR4FromArray4D(*result); in TEST_F() 137 auto actual_literal = LiteralUtil::CreateR4FromArray4D(*result); in TEST_F() 147 auto actual_literal = LiteralUtil::CreateR2FromArray2D(*result); in TEST_F() [all …]
|
/external/tensorflow/tensorflow/compiler/xla/service/cpu/tests/ |
D | cpu_infeed_test.cc | 61 TestInfeedRoundTrip(LiteralUtil::CreateR0<bool>(true)); in TEST_F() 65 TestInfeedRoundTrip(LiteralUtil::CreateR1<uint32>({1, 2, 3})); in TEST_F() 69 TestInfeedRoundTrip(LiteralUtil::CreateR2F32Linspace(0.0, 1.0, 128, 64)); in TEST_F() 74 LiteralUtil::CreateR3({{{1.0f, 2.0f, 3.0f}, {4.0f, 5.0f, 6.0f}}, in TEST_F() 82 TestInfeedRoundTrip(LiteralUtil::CreateR3WithLayout( in TEST_F() 87 TestInfeedRoundTrip(LiteralUtil::CreateR3WithLayout( in TEST_F() 94 TestInfeedRoundTrip(LiteralUtil::CreateR4( in TEST_F() 100 TestInfeedRoundTrip(LiteralUtil::MakeTupleFromSlices( in TEST_F() 101 {LiteralUtil::CreateR1<uint32>({1, 2, 3}), in TEST_F() 102 LiteralUtil::CreateR0<bool>(false)})); in TEST_F() [all …]
|
/external/tensorflow/tensorflow/compiler/xla/service/ |
D | hlo_evaluator_test.cc | 153 auto low = LiteralUtil::CreateR2<float>({{0.f, 2.f}, {2.f, 4.f}}); in TEST_P() 154 auto value = LiteralUtil::CreateR2<float>({{0.f, 5.f}, {0.f, 4.f}}); in TEST_P() 155 auto high = LiteralUtil::CreateR2<float>({{2.f, 4.f}, {4.f, 4.f}}); in TEST_P() 168 auto expected = LiteralUtil::CreateR2<float>({{0, 4}, {2, 4}}); in TEST_P() 178 LiteralUtil::CreateR2<int64>({{0, ones(54)}, {ones(54), ones(58)}}); in TEST_P() 179 auto value = LiteralUtil::CreateR2<int64>({{0, ones(56)}, {0, ones(58)}}); in TEST_P() 180 auto high = LiteralUtil::CreateR2<int64>( in TEST_P() 195 LiteralUtil::CreateR2<int64>({{0, ones(55)}, {ones(54), ones(58)}}); in TEST_P() 201 auto low = LiteralUtil::CreateR0<float>(0.f); in TEST_P() 202 auto value = LiteralUtil::CreateR2<float>({{-1.f, 0.f}, {1.f, 2.f}}); in TEST_P() [all …]
|
D | hlo_creation_utils_test.cc | 61 evaluator.Evaluate(*module, {LiteralUtil::CreateR1<int32>({3, 4})})); in TEST_F() 62 CHECK_EQ(result_literal, LiteralUtil::CreateR1<int32>({3, 4})); in TEST_F() 80 evaluator.Evaluate(*module, {LiteralUtil::CreateR3<int32>( in TEST_F() 84 LiteralUtil::CreateR2<int32>( in TEST_F() 103 evaluator.Evaluate(*module, {LiteralUtil::CreateR1<int32>({9, 10})})); in TEST_F() 104 CHECK_EQ(result_literal, LiteralUtil::CreateR2<int32>({{9, 10}})); in TEST_F() 122 evaluator.Evaluate(*module, {LiteralUtil::CreateR1<int32>({9, 10})})); in TEST_F() 123 CHECK_EQ(result_literal, LiteralUtil::CreateR3<int32>({{{9, 10}}})); in TEST_F() 141 evaluator.Evaluate(*module, {LiteralUtil::CreateR0<int32>(9)})); in TEST_F() 142 CHECK_EQ(result_literal, LiteralUtil::CreateR2<int32>({{9}})); in TEST_F() [all …]
|
/external/tensorflow/tensorflow/compiler/xla/service/gpu/tests/ |
D | infeed_test.cc | 55 TestInfeedRoundTrip(LiteralUtil::CreateR0<bool>(true)); in TEST_F() 59 TestInfeedRoundTrip(LiteralUtil::CreateR1<uint32>({1, 2, 3})); in TEST_F() 63 TestInfeedRoundTrip(LiteralUtil::CreateR2F32Linspace(0.0, 1.0, 128, 64)); in TEST_F() 68 LiteralUtil::CreateR3({{{1.0f, 2.0f, 3.0f}, {4.0f, 5.0f, 6.0f}}, in TEST_F() 76 TestInfeedRoundTrip(LiteralUtil::CreateR3WithLayout( in TEST_F() 81 TestInfeedRoundTrip(LiteralUtil::CreateR3WithLayout( in TEST_F() 88 TestInfeedRoundTrip(LiteralUtil::CreateR4( in TEST_F() 97 TestInfeedRoundTrip(LiteralUtil::CreateR4FromArray4D<float>(array)); in TEST_F() 101 TestInfeedRoundTrip(LiteralUtil::MakeTupleFromSlices( in TEST_F() 102 {LiteralUtil::CreateR1<uint32>({1, 2, 3}), in TEST_F() [all …]
|
/external/tensorflow/tensorflow/compiler/tf2xla/lib/ |
D | util.cc | 35 xla::LiteralUtil::Zero(shape.element_type())), in Zeros() 70 literal = xla::LiteralUtil::CreateR0<uint8>(value); in IntegerLiteral() 73 literal = xla::LiteralUtil::CreateR0<uint32>(value); in IntegerLiteral() 76 literal = xla::LiteralUtil::CreateR0<uint64>(value); in IntegerLiteral() 79 literal = xla::LiteralUtil::CreateR0<int8>(value); in IntegerLiteral() 82 literal = xla::LiteralUtil::CreateR0<int32>(value); in IntegerLiteral() 85 literal = xla::LiteralUtil::CreateR0<int64>(value); in IntegerLiteral() 88 literal = xla::LiteralUtil::CreateR0<float>(value); in IntegerLiteral() 91 literal = xla::LiteralUtil::CreateR0<double>(value); in IntegerLiteral() 94 literal = xla::LiteralUtil::CreateR0<complex64>(value); in IntegerLiteral() [all …]
|