HomeSort by relevance Sort by last modified time
    Searched refs:ShapeUtil (Results 1 - 25 of 367) sorted by null

1 2 3 4 5 6 7 8 91011>>

  /external/tensorflow/tensorflow/compiler/xla/
shape_util_test.cc 44 Shape matrix = ShapeUtil::MakeShape(F32, {2, 3});
45 EXPECT_EQ(3, ShapeUtil::GetDimension(matrix, -1));
46 EXPECT_EQ(2, ShapeUtil::GetDimension(matrix, -2));
50 auto shape = ShapeUtil::MakeShape(F32, {1, 2, 3, 4});
51 ASSERT_EQ(4, ShapeUtil::GetDimension(shape, -1));
55 Shape matrix = ShapeUtil::MakeShape(F32, {2, 3});
56 ASSERT_DEATH(ShapeUtil::GetDimension(matrix, -3), "dimension_number >= 0");
60 Shape shape = ShapeUtil::MakeShape(F32, {3});
65 Shape shape = ShapeUtil::MakeShape(F32, {3, 2});
71 Shape shape = ShapeUtil::MakeShape(F32, {3, 2, 7})
    [all...]
shape_layout.cc 26 if (!ShapeUtil::Compatible(other_shape, shape_)) {
28 ShapeUtil::HumanString(other_shape),
29 ShapeUtil::HumanString(shape()));
36 if (!ShapeUtil::Compatible(*to_shape, shape_)) {
38 ShapeUtil::HumanString(*to_shape),
39 ShapeUtil::HumanString(shape()));
50 return ShapeUtil::Equal(shape, shape_);
67 TF_CHECK_OK(ShapeUtil::ValidateShape(shape_));
73 *ShapeUtil::GetMutableSubshape(&shape_, shape_index)->mutable_layout() =
75 TF_CHECK_OK(ShapeUtil::ValidateShape(shape_))
    [all...]
shape_test.cc 35 const Shape opaque_ = ShapeUtil::MakeOpaqueShape();
36 const Shape token_ = ShapeUtil::MakeTokenShape();
37 const Shape scalar_ = ShapeUtil::MakeShape(F32, {});
39 ShapeUtil::MakeShapeWithLayout(F32, {}, {}, {Tile({256})});
40 const Shape matrix_ = ShapeUtil::MakeShape(U32, {1, 2});
41 const Shape matrix2_ = ShapeUtil::MakeShapeWithLayout(S32, {3, 4}, {0, 1});
43 ShapeUtil::MakeTupleShape({opaque_, scalar_, matrix_, matrix2_});
45 ShapeUtil::MakeTupleShape({tuple_, matrix_, token_});
47 ShapeUtil::MakeShape(S32, {5, 2}, {true, false});
54 EXPECT_TRUE(ShapeUtil::Equal(shape, shape_copy)
    [all...]
layout_util_test.cc 32 Shape shape = ShapeUtil::MakeShape(element_type, dimensions);
40 Shape shape = ShapeUtil::MakeShape(element_type, dimensions);
48 ShapeUtil::MakeTupleShape({MakeShapeWithLayout(F32, {2, 3}, {0, 1})});
50 ShapeUtil::MakeTupleShape({MakeShapeWithLayout(F32, {2, 2}, {0, 1})});
52 Shape tuple0 = ShapeUtil::MakeTupleShape({});
53 Shape tuple1 = ShapeUtil::MakeTupleShape({shape});
54 Shape tuple2 = ShapeUtil::MakeTupleShape({shape, shape});
66 Shape other_tuple2 = ShapeUtil::MakeTupleShape({shape, other_shape});
119 Shape src = ShapeUtil::MakeTupleShape(
122 ShapeUtil::MakeTupleShape
    [all...]
text_literal_reader_test.cc 47 ShapeUtil::Equal(ShapeUtil::MakeShape(F32, {1, 2, 3}), literal.shape()));
shape_util.cc 83 /* static */ bool ShapeUtil::IsArrayPrimitiveType(
104 ShapeUtil::MakeValidatedShape(element_type, dimensions));
110 TF_RETURN_IF_ERROR(ShapeUtil::ValidateShape(shape));
115 /* static */ bool ShapeUtil::Equal(const Shape& lhs, const Shape& rhs) {
119 VLOG(3) << "ShapeUtil::Equal differ: lhs = " << lhs.ShortDebugString()
126 /* static */ bool ShapeUtil::EqualIgnoringFpPrecision(const Shape& lhs,
130 VLOG(3) << "ShapeUtil::EqualIgnoringFpPrecision differ: lhs = "
137 /* static */ int64 ShapeUtil::TrueRank(const Shape& shape) {
148 /* static */ ProgramShape ShapeUtil::MakeProgramShape(
158 /* static */ Shape ShapeUtil::MakeShape(PrimitiveType element_type
    [all...]
  /external/tensorflow/tensorflow/compiler/xla/service/cpu/
cpu_hlo_support_checker.cc 28 ShapeUtil::ValidateShapeWithOptionalLayout(instruction->shape()));
29 TF_RETURN_IF_ERROR(ShapeUtil::ForEachSubshapeWithStatus(
37 ShapeUtil::HumanStringWithLayout(instruction->shape()));
cpu_instruction_fusion_test.cc 52 0, ShapeUtil::MakeShape(F32, {1024, 256}), "arg0"));
54 1, ShapeUtil::MakeShape(F32, {256, 1}), "arg1"));
57 ShapeUtil::MakeShape(S32, {1024, 256}), HloOpcode::kExp, arg0));
59 MakeDot(ShapeUtil::MakeShape(F32, {1024, 1}), exp0, arg1));
71 0, ShapeUtil::MakeShape(F32, {1, 256}), "arg0"));
73 1, ShapeUtil::MakeShape(F32, {256, 1024}), "arg1"));
76 ShapeUtil::MakeShape(S32, {256, 1024}), HloOpcode::kExp, arg1));
78 MakeDot(ShapeUtil::MakeShape(F32, {1, 1024}), arg0, exp1));
90 0, ShapeUtil::MakeShape(F32, {2, 512, 2, 128}), "arg0"));
92 1, ShapeUtil::MakeShape(F32, {256, 1}), "arg1"))
    [all...]
ir_emission_utils.cc 37 ShapeUtil::ElementsIn(shape) *
38 ShapeUtil::ByteSizeOfPrimitiveType(shape.element_type());
67 if (ShapeUtil::IsZeroElementArray(input_shape) ||
68 ShapeUtil::IsZeroElementArray(kernel_shape)) {
73 ShapeUtil::SameElementTypeIgnoringFpPrecision(input_shape, kernel_shape));
  /external/tensorflow/tensorflow/compiler/xla/service/gpu/
gpu_hlo_support_checker.cc 28 ShapeUtil::ValidateShapeWithOptionalLayout(instruction->shape()));
29 TF_RETURN_IF_ERROR(ShapeUtil::ForEachSubshapeWithStatus(
37 ShapeUtil::HumanStringWithLayout(instruction->shape()));
infeed_thunk.cc 42 << ShapeUtil::HumanStringWithLayout(infeed_shape);
44 << ShapeUtil::HumanStringWithLayout(infeed_shape);
46 << ShapeUtil::HumanStringWithLayout(infeed_shape);
48 ShapeUtil::Equal(infeed_buffers.shape(), infeed_shape.tuple_shapes(0)))
50 << ShapeUtil::HumanStringWithLayout(infeed_shape.tuple_shapes(0))
52 << ShapeUtil::HumanStringWithLayout(infeed_buffers.shape());
60 const Shape& shape = ShapeUtil::GetSubshape(infeed_buffers.shape(),
77 const int64 tuple_element_count = ShapeUtil::TupleElementCount(shape);
cudnn_conv_rewriter_test.cc 102 0, ShapeUtil::MakeShape(F32, {1, 1, 3, 1}), "activations"));
105 1, ShapeUtil::MakeShape(F32, {1, 1, 2, 1}), "gradients"));
143 0, ShapeUtil::MakeShape(F32, {1, 1, 3, 1}), "activations"));
146 1, ShapeUtil::MakeShape(F32, {1, 1, 3, 1}), "gradients"));
173 0, ShapeUtil::MakeShape(F32, {20, 35, 35, 32}), "activations"));
176 1, ShapeUtil::MakeShape(F32, {20, 35, 35, 32}), "gradients"));
185 ShapeUtil::MakeShape(F32, {32, 3, 3, 32}), activations, gradients,
203 0, ShapeUtil::MakeShape(F32, {20, 10, 10, 192}), "activations"));
206 1, ShapeUtil::MakeShape(F32, {20, 4, 4, 320}), "gradients"));
215 ShapeUtil::MakeShape(F32, {320, 3, 3, 192}), activations, gradients
    [all...]
  /external/tensorflow/tensorflow/compiler/xla/service/cpu/tests/
cpu_bytesizeof_test.cc 26 xla::ShapeUtil::MakeTupleShape({xla::ShapeUtil::MakeShape(xla::F32, {})});
34 xla::ShapeUtil::MakeTupleShape({xla::ShapeUtil::MakeShape(xla::F32, {})});
  /external/tensorflow/tensorflow/compiler/xla/service/
gather_expander_test.cc 93 ASSERT_EQ(ShapeUtil::TupleElementCount(while_shape), 4);
95 EXPECT_TRUE(ShapeUtil::SameDimensions(
96 ShapeUtil::MakeShape(S32, {3, 3}),
97 ShapeUtil::GetTupleElementShape(while_shape, 1)));
99 EXPECT_TRUE(ShapeUtil::SameDimensions(
100 ShapeUtil::MakeShape(S32, {2}),
101 ShapeUtil::GetTupleElementShape(while_shape, 2)));
103 EXPECT_TRUE(ShapeUtil::SameDimensions(
104 ShapeUtil::MakeShape(S32, {2, 3}),
105 ShapeUtil::GetTupleElementShape(while_shape, 3)))
    [all...]
shape_inference_test.cc 37 const Shape s32_ = ShapeUtil::MakeShape(S32, {});
38 const Shape f16_ = ShapeUtil::MakeShape(F16, {});
39 const Shape f32_ = ShapeUtil::MakeShape(F32, {});
40 const Shape f64_ = ShapeUtil::MakeShape(F64, {});
41 const Shape pred_ = ShapeUtil::MakeShape(PRED, {});
45 const Shape vector_32_ = ShapeUtil::MakeShape(F32, {32});
46 const Shape vector_64_ = ShapeUtil::MakeShape(F32, {64});
47 const Shape matrix_32_48_ = ShapeUtil::MakeShape(F32, {32, 48});
48 const Shape matrix_32_64_ = ShapeUtil::MakeShape(F32, {32, 64});
49 const Shape matrix_64_48_ = ShapeUtil::MakeShape(F32, {64, 48})
    [all...]
optimize_input_output_buffer_alias_test.cc 35 r1f32_ = ShapeUtil::MakeShape(F32, {4});
36 r2f32_ = ShapeUtil::MakeShape(F32, {4, 5});
37 r3f32_ = ShapeUtil::MakeShape(F32, {4, 5, 6});
38 r4f32_ = ShapeUtil::MakeShape(F32, {4, 5, 6, 7});
41 return ShapeUtil::ByteSizeOf(shape);
79 Shape input = ShapeUtil::MakeTupleShape({r1f32_, r2f32_});
80 Shape output = ShapeUtil::MakeTupleShape({r3f32_, r4f32_});
88 Shape input = ShapeUtil::MakeTupleShape({r1f32_, r2f32_, r3f32_, r4f32_});
89 Shape output = ShapeUtil::MakeTupleShape({r1f32_, r2f32_, r3f32_, r4f32_});
103 Shape input = ShapeUtil::MakeTupleShape({r1f32_, r1f32_, r2f32_, r2f32_})
    [all...]
hlo_sharding_test.cc 51 EXPECT_IS_OK(sharding.Validate(ShapeUtil::MakeShape(U32, {4}),
67 EXPECT_IS_OK(sharding.Validate(ShapeUtil::MakeShape(U32, {4}),
70 sharding.Validate(ShapeUtil::MakeShape(U32, {4}), /*num_devices=*/5));
73 sharding.GetAsShapeTree(ShapeUtil::MakeShape(U32, {4}));
82 EXPECT_IS_NOT_OK(sharding.Validate(ShapeUtil::MakeShape(F32, {4, 6}),
89 EXPECT_IS_NOT_OK(sharding.Validate(ShapeUtil::MakeShape(U32, {4, 6}),
95 Shape shape = ShapeUtil::MakeShape(U32, {4, 5});
97 EXPECT_IS_OK(sharding.Validate(ShapeUtil::MakeShape(F32, {3, 5}),
120 HloSharding sharding = HloSharding::SingleTuple(ShapeUtil::MakeTupleShape({}),
127 Shape nested_tuple_shape = ShapeUtil::MakeTupleShape(
    [all...]
shape_inference.cc 55 string(op_type), ShapeUtil::HumanString(shape));
82 if (ShapeUtil::TupleElementCount(accumulator_shape) != inputs) {
86 inputs, ShapeUtil::TupleElementCount(accumulator_shape));
95 ShapeUtil::HumanString(accumulator_shape));
103 ShapeUtil::HumanString(accumulator_shape));
111 if (!ShapeUtil::Compatible(*accumulator_subshapes[i],
116 i, ShapeUtil::HumanString(reducer_shape.parameters(i)),
117 ShapeUtil::HumanString(*accumulator_subshapes[i]));
120 if (!ShapeUtil::CompatibleIgnoringFpPrecision(*accumulator_subshapes[i],
125 i, ShapeUtil::HumanString(*accumulator_subshapes[i])
    [all...]
batchnorm_expander_test.cc 57 Shape input_shape = ShapeUtil::MakeShape(F32, {2, 2, 2, 2});
58 Shape scale_shape = ShapeUtil::MakeShape(F32, {2});
59 Shape offset_shape = ShapeUtil::MakeShape(F32, {2});
72 ShapeUtil::MakeTupleShape({input_shape, scale_shape, offset_shape}),
92 Shape input_shape = ShapeUtil::MakeShape(F32, {2, 2, 2, 2});
93 Shape scale_shape = ShapeUtil::MakeShape(F32, {2});
94 Shape mean_shape = ShapeUtil::MakeShape(F32, {2});
95 Shape var_shape = ShapeUtil::MakeShape(F32, {2});
96 Shape grad_output_shape = ShapeUtil::MakeShape(F32, {2, 2, 2, 2});
115 ShapeUtil::MakeTupleShape({input_shape, scale_shape, mean_shape}), param0
    [all...]
hlo_matchers_test.cc 43 auto shape = ShapeUtil::MakeShape(F32, {1});
84 ShapeUtil::MakeShape(F32, {1}), {c1.get(), c2.get()}, "foo_target");
109 0, ShapeUtil::MakeShapeWithLayout(F32, {5, 7}, {0, 1}), "param");
111 EXPECT_THAT(p0.get(), op::Shape(ShapeUtil::MakeShape(F32, {5, 7})));
115 ::testing::Not(op::ShapeWithLayout(ShapeUtil::MakeShape(F32, {5, 7}))));
118 ::testing::Not(op::Shape(ShapeUtil::MakeShape(F32, {7, 5}))));
122 ::testing::Not(op::ShapeWithLayout(ShapeUtil::MakeShape(F32, {7, 5}))));
125 op::Shape(ShapeUtil::MakeShapeWithLayout(F32, {5, 7}, {0, 1})));
127 EXPECT_THAT(p0.get(), op::ShapeWithLayout(ShapeUtil::MakeShapeWithLayout(
132 ShapeUtil::MakeShapeWithLayout(F32, {5, 7}, {1, 0}))))
    [all...]
  /external/tensorflow/tensorflow/compiler/xla/tests/
query_inferred_shape_test.cc 39 ASSERT_TRUE(ShapeUtil::Equal(shape, ShapeUtil::MakeShape(F32, {})));
client_test.cc 52 ShapeUtil::MakeShapeWithLayout(S32, /*dimensions=*/{2, 2},
84 ShapeUtil::MakeTupleShape(
85 {ShapeUtil::MakeShapeWithLayout(S32, /*dimensions=*/{2, 2},
87 ShapeUtil::MakeShapeWithLayout(S32, /*dimensions=*/{2, 2},
100 EXPECT_EQ(2, ShapeUtil::TupleElementCount(result.shape()));
102 EXPECT_TRUE(ShapeUtil::Equal(
103 ShapeUtil::GetTupleElementShape(result.shape(), 0),
104 ShapeUtil::MakeShapeWithLayout(S32, /*dimensions=*/{2, 2},
106 EXPECT_TRUE(ShapeUtil::Equal(
107 ShapeUtil::GetTupleElementShape(result.shape(), 1)
    [all...]
hlo_metadata_test.cc 33 auto x = Parameter(builder, 0, ShapeUtil::MakeShape(F32, {}), "x");
34 auto y = Parameter(builder, 1, ShapeUtil::MakeShape(F32, {}), "y");
47 Shape argument_layout = ShapeUtil::MakeShape(F32, {});
69 Shape argument_layout = ShapeUtil::MakeShape(F32, {});
  /external/tensorflow/tensorflow/compiler/xla/client/
xla_builder_test.cc 140 Shape s = ShapeUtil::MakeShape(PRED, {});
156 Shape s = ShapeUtil::MakeShape(PRED, {});
182 auto x = Parameter(&b, 0, ShapeUtil::MakeShape(F32, {3, 5}), "x");
191 const auto& x_shape = ShapeUtil::MakeShape(S32, {2, 4, 6});
192 const auto& y_shape = ShapeUtil::MakeShape(S32, {2, 4});
198 EXPECT_TRUE(ShapeUtil::Equal(add_shape, x_shape));
207 auto x = Parameter(&b, 0, ShapeUtil::MakeShape(S32, {1, 3, 5, 7}), "x");
216 auto x = Parameter(&b, 0, ShapeUtil::MakeShape(U32, {2, 4, 6}), "x");
217 auto y = Parameter(&b, 1, ShapeUtil::MakeShape(U32, {2, 4}), "y");
226 Parameter(&b_call, 0, ShapeUtil::MakeShape(PRED, {}), "x")
    [all...]
  /external/tensorflow/tensorflow/compiler/xla/service/gpu/tests/
gpu_noalias_test.cc 37 auto param_shape = ShapeUtil::MakeShape(F32, {2, 2});
44 ShapeUtil::MakeShape(F32, {2, 4}), {param_x, param_y}, 1));
46 ShapeUtil::MakeShape(F32, {2, 6}), {concat, param_x}, 1));

Completed in 1913 milliseconds

1 2 3 4 5 6 7 8 91011>>