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

1 2 3 4 5 6 7 8 91011

  /external/tensorflow/tensorflow/compiler/xla/
shape_util_test.cc 32 Shape matrix = ShapeUtil::MakeShape(F32, {2, 3});
33 EXPECT_EQ(3, ShapeUtil::GetDimension(matrix, -1));
34 EXPECT_EQ(2, ShapeUtil::GetDimension(matrix, -2));
38 auto shape = ShapeUtil::MakeShape(F32, {1, 2, 3, 4});
39 ASSERT_EQ(4, ShapeUtil::GetDimension(shape, -1));
43 Shape matrix = ShapeUtil::MakeShape(F32, {2, 3});
44 ASSERT_DEATH(ShapeUtil::GetDimension(matrix, -3), "dimension_number >= 0");
48 Shape shape = ShapeUtil::MakeShape(F32, {3});
53 Shape shape = ShapeUtil::MakeShape(F32, {3, 2});
59 Shape shape = ShapeUtil::MakeShape(F32, {3, 2, 7})
    [all...]
shape_layout.cc 26 if (!ShapeUtil::Compatible(other_shape, shape_)) {
28 ShapeUtil::HumanString(other_shape).c_str(),
29 ShapeUtil::HumanString(shape()).c_str());
36 if (!ShapeUtil::Compatible(*to_shape, shape_)) {
38 ShapeUtil::HumanString(*to_shape).c_str(),
39 ShapeUtil::HumanString(shape()).c_str());
50 return ShapeUtil::Equal(shape, shape_);
55 CHECK(!ShapeUtil::IsTuple(shape_));
64 CHECK(!ShapeUtil::IsTuple(shape_));
65 CHECK(!ShapeUtil::IsOpaque(shape_))
    [all...]
layout_util.cc 91 DCHECK(!ShapeUtil::IsTuple(shape));
112 if (ShapeUtil::IsTuple(*shape)) {
118 } else if (ShapeUtil::IsOpaque(*shape)) {
144 if (ShapeUtil::IsTuple(shape)) {
153 } else if (ShapeUtil::IsOpaque(shape)) {
162 ShapeUtil::HumanString(shape).c_str());
170 if (ShapeUtil::IsTuple(shape)) {
174 if (ShapeUtil::IsOpaque(shape)) {
185 if (layout.minor_to_major_size() != ShapeUtil::Rank(shape)) {
189 layout.minor_to_major_size(), ShapeUtil::Rank(shape)
    [all...]
shape_util.cc 73 if (ShapeUtil::IsTuple(lhs) || ShapeUtil::IsTuple(rhs)) {
74 return ShapeUtil::IsTuple(lhs) && ShapeUtil::IsTuple(rhs) &&
79 } else if (ShapeUtil::IsOpaque(lhs) || ShapeUtil::IsOpaque(rhs)) {
80 return ShapeUtil::IsOpaque(lhs) && ShapeUtil::IsOpaque(rhs);
106 if (!ShapeUtil::SameDimensions(lhs, rhs)) {
110 if (!ShapeUtil::SameElementType(lhs, rhs))
    [all...]
text_literal_reader_test.cc 48 ShapeUtil::Equal(ShapeUtil::MakeShape(F32, {1, 2, 3}), literal->shape()));
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...]
  /external/tensorflow/tensorflow/compiler/xla/service/cpu/
cpu_hlo_support_checker.cc 29 ShapeUtil::ValidateShapeWithOptionalLayout(instruction->shape()));
30 TF_RETURN_IF_ERROR(ShapeUtil::ForEachSubshapeWithStatus(
38 ShapeUtil::HumanStringWithLayout(instruction->shape())
ir_emission_utils.cc 38 if (ShapeUtil::HasZeroElements(input_shape) ||
39 ShapeUtil::HasZeroElements(kernel_shape)) {
43 if (ShapeUtil::ElementIsComplex(input_shape) ||
44 ShapeUtil::ElementIsComplex(kernel_shape)) {
cpu_instruction_fusion_test.cc 45 0, ShapeUtil::MakeShape(F32, {1024, 256}), "arg0"));
47 1, ShapeUtil::MakeShape(F32, {256, 1}), "arg1"));
50 ShapeUtil::MakeShape(S32, {1024, 256}), HloOpcode::kExp, arg0));
52 MakeDot(ShapeUtil::MakeShape(F32, {1024, 1}), exp0, arg1));
64 0, ShapeUtil::MakeShape(F32, {1, 256}), "arg0"));
66 1, ShapeUtil::MakeShape(F32, {256, 1024}), "arg1"));
69 ShapeUtil::MakeShape(S32, {256, 1024}), HloOpcode::kExp, arg1));
71 MakeDot(ShapeUtil::MakeShape(F32, {1, 1024}), arg0, exp1));
83 0, ShapeUtil::MakeShape(F32, {2, 512, 2, 128}), "arg0"));
85 1, ShapeUtil::MakeShape(F32, {256, 1}), "arg1"))
    [all...]
  /external/tensorflow/tensorflow/compiler/xla/service/gpu/
gpu_hlo_support_checker.cc 29 ShapeUtil::ValidateShapeWithOptionalLayout(instruction->shape()));
30 TF_RETURN_IF_ERROR(ShapeUtil::ForEachSubshapeWithStatus(
38 ShapeUtil::HumanStringWithLayout(instruction->shape())
instruction_fusion_test.cc 34 ShapeUtil::MakeShape(S32, {}), HloOpcode::kExp, const0));
37 ShapeUtil::MakeShape(S32, {1}), exp1, {0}));
54 ShapeUtil::MakeShape(S32, {}), HloOpcode::kNegate, const0));
57 ShapeUtil::MakeShape(S32, {1}), negate1, {0}));
74 ShapeUtil::MakeShape(S32, {}), HloOpcode::kExp, const0));
76 HloInstruction::CreateReshape(ShapeUtil::MakeShape(S32, {}), exp1));
93 ShapeUtil::MakeShape(S32, {}), HloOpcode::kExp, const0));
95 HloInstruction::CreateTranspose(ShapeUtil::MakeShape(S32, {}), exp1, {}));
109 0, ShapeUtil::MakeShape(S32, {1, 1}), "0"));
111 ShapeUtil::MakeShape(S32, {1, 1}), HloOpcode::kDot, param0, param0))
    [all...]
  /external/tensorflow/tensorflow/compiler/xla/service/
shape_inference.cc 171 if (ShapeUtil::IsTuple(shape)) {
174 ShapeUtil::HumanString(shape).c_str());
175 } else if (ShapeUtil::IsOpaque(shape)) {
178 ShapeUtil::HumanString(shape).c_str());
195 if (ShapeUtil::Rank(accumulator_shape) != 0) {
203 if (!ShapeUtil::Compatible(accumulator_shape, reducer_shape.parameters(0))) {
207 ShapeUtil::HumanString(reducer_shape.parameters(0)).c_str(),
208 ShapeUtil::HumanString(accumulator_shape).c_str());
212 if (!ShapeUtil::CompatibleIgnoringFpPrecision(accumulator_shape,
217 ShapeUtil::HumanString(accumulator_shape).c_str()
    [all...]
hlo_sharding_test.cc 43 Shape tile_shape = ShapeUtil::MakeShape(U32, {4});
53 EXPECT_IS_OK(sharding.Validate(ShapeUtil::MakeShape(U32, {4}),
69 EXPECT_IS_OK(sharding.Validate(ShapeUtil::MakeShape(U32, {4}),
72 sharding.Validate(ShapeUtil::MakeShape(U32, {4}), /*num_devices=*/5));
75 sharding.GetAsShapeTree(ShapeUtil::MakeShape(U32, {4}));
83 Shape tile_shape = ShapeUtil::MakeShape(U32, {2, 3});
86 EXPECT_IS_NOT_OK(sharding.Validate(ShapeUtil::MakeShape(F32, {4, 6}),
92 Shape tile_shape = ShapeUtil::MakeShape(U32, {2, 3});
95 EXPECT_IS_NOT_OK(sharding.Validate(ShapeUtil::MakeShape(U32, {4, 6}),
101 Shape tile_shape = ShapeUtil::MakeShape(U32, {2, 3})
    [all...]
shape_inference_test.cc 37 const Shape s32_ = ShapeUtil::MakeShape(S32, {});
38 const Shape f32_ = ShapeUtil::MakeShape(F32, {});
39 const Shape f64_ = ShapeUtil::MakeShape(F64, {});
40 const Shape pred_ = ShapeUtil::MakeShape(PRED, {});
44 const Shape vector_32_ = ShapeUtil::MakeShape(F32, {32});
45 const Shape vector_64_ = ShapeUtil::MakeShape(F32, {64});
46 const Shape matrix_32_48_ = ShapeUtil::MakeShape(F32, {32, 48});
47 const Shape matrix_32_64_ = ShapeUtil::MakeShape(F32, {32, 64});
48 const Shape matrix_64_48_ = ShapeUtil::MakeShape(F32, {64, 48});
51 const Shape s32matrix_64_64_ = ShapeUtil::MakeShape(S32, {64, 64})
    [all...]
zero_sized_hlo_elimination.cc 35 ShapeUtil::IsTuple(instruction->shape())) {
39 ShapeUtil::HasZeroElements(instruction->shape())) {
batchnorm_expander_test.cc 43 Shape input_shape = ShapeUtil::MakeShape(F32, {2, 2, 2, 2});
44 Shape scale_shape = ShapeUtil::MakeShape(F32, {2});
45 Shape offset_shape = ShapeUtil::MakeShape(F32, {2});
58 ShapeUtil::MakeTupleShape({input_shape, scale_shape, offset_shape}),
77 Shape input_shape = ShapeUtil::MakeShape(F32, {2, 2, 2, 2});
78 Shape scale_shape = ShapeUtil::MakeShape(F32, {2});
79 Shape mean_shape = ShapeUtil::MakeShape(F32, {2});
80 Shape var_shape = ShapeUtil::MakeShape(F32, {2});
81 Shape grad_output_shape = ShapeUtil::MakeShape(F32, {2, 2, 2, 2});
100 ShapeUtil::MakeTupleShape({input_shape, scale_shape, mean_shape}), param0
    [all...]
implicit_broadcast_remover_test.cc 36 const Shape shape = ShapeUtil::MakeShape(F32, {2, 4});
55 const Shape shape = ShapeUtil::MakeShape(F32, {2, 4});
57 0, ShapeUtil::MakeShape(F32, {}), "scalar_param"));
66 EXPECT_FALSE(ShapeUtil::Compatible(root->shape(), root->operand(0)->shape()));
67 EXPECT_TRUE(ShapeUtil::Compatible(root->shape(), root->operand(1)->shape()));
74 EXPECT_TRUE(ShapeUtil::Compatible(root->shape(), root->operand(0)->shape()));
75 EXPECT_TRUE(ShapeUtil::Compatible(root->shape(), root->operand(1)->shape()));
81 const Shape shape = ShapeUtil::MakeShape(F32, {2, 4, 6});
85 1, ShapeUtil::MakeShape(F32, {1, 4, 1}), "p1"));
96 EXPECT_TRUE(ShapeUtil::Compatible(root->shape(), root->operand(0)->shape()))
    [all...]
hlo_cost_analysis_test.cc 46 return ShapeUtil::ByteSizeOf(shape, kPointerSize);
66 auto x = builder.Parameter(0, ShapeUtil::MakeShape(F32, {}), "x");
77 auto x = builder.Parameter(0, ShapeUtil::MakeShape(F32, {}), "x");
78 auto y = builder.Parameter(1, ShapeUtil::MakeShape(F32, {}), "y");
88 auto x = builder.Parameter(0, ShapeUtil::MakeShape(F32, {}), "x");
99 auto x = builder.Parameter(0, ShapeUtil::MakeShape(F32, {}), "x");
100 auto y = builder.Parameter(1, ShapeUtil::MakeShape(F32, {}), "y");
110 auto x = builder.Parameter(0, ShapeUtil::MakeShape(F32, {}), "x");
111 auto y = builder.Parameter(1, ShapeUtil::MakeShape(F32, {}), "y");
149 auto lhs = builder.Parameter(0, ShapeUtil::MakeShape(F32, {10, 5}), "lhs")
    [all...]
generic_transfer_manager.cc 58 TF_RET_CHECK(elements.size() == ShapeUtil::TupleElementCount(shape));
77 TF_RET_CHECK(ShapeUtil::Equal(device_buffer.on_device_shape(),
83 TF_RETURN_IF_ERROR(ShapeUtil::ForEachSubshapeWithStatus(
86 if (!ShapeUtil::IsTuple(subshape)) {
105 << ShapeUtil::HumanString(shape)
110 TF_RET_CHECK(ShapeUtil::Equal(device_buffer.on_device_shape(),
114 ShapeUtil::Compatible(literal.shape(), device_buffer.on_host_shape()));
119 return ShapeUtil::ForEachSubshapeWithStatus(
123 if (ShapeUtil::IsArray(device_subshape)) {
174 return ShapeUtil::ByteSizeOf(shape, pointer_size_)
    [all...]
reshape_mover_test.cc 41 auto root_shape = ShapeUtil::MakeShape(F32, {8, 7});
43 0, ShapeUtil::MakeShape(F32, {1, 8, 1, 7}), "param0"));
45 1, ShapeUtil::MakeShape(F32, {1, 8, 7, 1}), "param1"));
78 auto root_shape = ShapeUtil::MakeShape(F32, {8, 7});
80 HloInstruction::CreateRng(ShapeUtil::MakeShape(F32, {1, 8, 1, 7, 1}),
104 auto root_shape = ShapeUtil::MakeShape(F32, {});
106 0, ShapeUtil::MakeShape(F32, {1, 1, 1}), "param0"));
108 1, ShapeUtil::MakeShape(F32, {1, 1, 1}), "param1"));
130 auto root_shape = ShapeUtil::MakeShape(F32, {8, 7});
132 0, ShapeUtil::MakeShape(F32, {1, 8, 1, 7}), "param0"))
    [all...]
  /external/tensorflow/tensorflow/compiler/xla/tests/
query_inferred_shape_test.cc 39 ASSERT_TRUE(ShapeUtil::Equal(*shape, ShapeUtil::MakeShape(F32, {})));
client_test.cc 51 ShapeUtil::MakeShapeWithLayout(S32, /*dimensions=*/{2, 2},
83 ShapeUtil::MakeTupleShape(
84 {ShapeUtil::MakeShapeWithLayout(S32, /*dimensions=*/{2, 2},
86 ShapeUtil::MakeShapeWithLayout(S32, /*dimensions=*/{2, 2},
97 EXPECT_TRUE(ShapeUtil::IsTuple(result->shape()));
98 EXPECT_EQ(2, ShapeUtil::TupleElementCount(result->shape()));
100 EXPECT_TRUE(ShapeUtil::Equal(
101 ShapeUtil::GetTupleElementShape(result->shape(), 0),
102 ShapeUtil::MakeShapeWithLayout(S32, /*dimensions=*/{2, 2},
104 EXPECT_TRUE(ShapeUtil::Equal
    [all...]
hlo_metadata_test.cc 34 auto x = builder->Parameter(0, ShapeUtil::MakeShape(F32, {}), "x");
35 auto y = builder->Parameter(1, ShapeUtil::MakeShape(F32, {}), "y");
48 Shape argument_layout = ShapeUtil::MakeShape(F32, {});
70 Shape argument_layout = ShapeUtil::MakeShape(F32, {});
  /external/tensorflow/tensorflow/compiler/tf2xla/lib/
batch_dot.cc 39 if (xla::ShapeUtil::Rank(*x_shape) != xla::ShapeUtil::Rank(*y_shape)) {
42 xla::ShapeUtil::HumanString(*x_shape), " vs. ",
43 xla::ShapeUtil::HumanString(*y_shape));
45 const int ndims = xla::ShapeUtil::Rank(*x_shape);
58 xla::ShapeUtil::HumanString(*x_shape), " vs ",
59 xla::ShapeUtil::HumanString(*y_shape));
70 xla::ShapeUtil::HumanString(*x_shape), " transpose: ", transpose_x,
71 " vs. ", xla::ShapeUtil::HumanString(*y_shape),
76 if (xla::ShapeUtil::HasZeroElements(*x_shape) |
    [all...]
  /external/tensorflow/tensorflow/compiler/tf2xla/
shape_util.cc 29 if (xla::ShapeUtil::IsTuple(shape)) {
31 xla::ShapeUtil::HumanString(shape),
35 for (int i = 0; i < xla::ShapeUtil::Rank(shape); ++i) {
56 *shape = xla::ShapeUtil::MakeShapeWithLayout(type, dimensions, layout);

Completed in 504 milliseconds

1 2 3 4 5 6 7 8 91011