Home
last modified time | relevance | path

Searched refs:shape_proto (Results 1 – 22 of 22) sorted by relevance

/external/tensorflow/tensorflow/compiler/xla/
Dshape.cc24 Shape::Shape(const ShapeProto& shape_proto) { in Shape() argument
25 set_element_type(shape_proto.element_type()); in Shape()
26 dimensions_.reserve(shape_proto.dimensions_size()); in Shape()
27 for (const int64 dimension : shape_proto.dimensions()) { in Shape()
35 if (shape_proto.dimensions_size() != in Shape()
36 shape_proto.is_dynamic_dimension_size()) { in Shape()
37 if (shape_proto.is_dynamic_dimension_size() != 0) { in Shape()
45 shape_proto.dimensions_size(), shape_proto.is_dynamic_dimension_size()); in Shape()
47 dynamic_dimensions_[i] = shape_proto.is_dynamic_dimension(i); in Shape()
49 tuple_shapes_.reserve(shape_proto.tuple_shapes_size()); in Shape()
[all …]
Dshape.h39 explicit Shape(const ShapeProto& shape_proto);
Dliteral_test.cc1448 void SetDefaultLayoutOnProto(ShapeProto* shape_proto) { in SetDefaultLayoutOnProto() argument
1449 CHECK(ShapeUtil::IsArrayPrimitiveType(shape_proto->element_type())); in SetDefaultLayoutOnProto()
1450 shape_proto->mutable_layout()->set_format(DENSE); in SetDefaultLayoutOnProto()
1452 shape_proto->mutable_layout()->mutable_minor_to_major(); in SetDefaultLayoutOnProto()
1453 minor_to_major->Resize(shape_proto->dimensions_size(), 0); in SetDefaultLayoutOnProto()
/external/tensorflow/tensorflow/compiler/jit/
Dencapsulate_util_test.cc49 TensorShapeProto shape_proto; in TEST() local
50 output_shapes[0].AsProto(&shape_proto); in TEST()
51 EXPECT_EQ(shape_proto.dim_size(), 1); in TEST()
52 EXPECT_EQ(shape_proto.dim(0).size(), 2); in TEST()
Dencapsulate_subgraphs_pass.cc1218 TensorShapeProto shape_proto; in AddHostComputeKeyPlaceholder() local
1220 shape.AsProto(&shape_proto); in AddHostComputeKeyPlaceholder()
1227 builder.Attr("shape", shape_proto); in AddHostComputeKeyPlaceholder()
/external/tensorflow/tensorflow/contrib/periodic_resample/ops/
Darray_ops_test.cc29 TensorShapeProto shape_proto; in TEST() local
30 shape.AsProto(&shape_proto); in TEST()
34 .Attr("shape", shape_proto) in TEST()
/external/tensorflow/tensorflow/tools/graph_transforms/
Dsummarize_graph_main.cc46 TensorShapeProto shape_proto = node->attr().at("shape").shape(); in PrintNodeInfo() local
47 Status shape_status = PartialTensorShape::IsValidShape(shape_proto); in PrintNodeInfo()
49 shape_description = PartialTensorShape(shape_proto).DebugString(); in PrintNodeInfo()
83 TensorShapeProto shape_proto = node->attr().at("shape").shape(); in PrintBenchmarkUsage() local
84 if (PartialTensorShape::IsValid(shape_proto)) { in PrintBenchmarkUsage()
85 shape = PartialTensorShape(shape_proto); in PrintBenchmarkUsage()
Dfold_constants_test.cc146 auto* shape_proto = shape_attr.mutable_list()->add_shape(); in TestPreserveOutputShapes() local
147 shape_proto->add_dim()->set_size(1); in TestPreserveOutputShapes()
148 shape_proto->add_dim()->set_size(1); in TestPreserveOutputShapes()
149 shape_proto->add_dim()->set_size(3); in TestPreserveOutputShapes()
/external/tensorflow/tensorflow/core/grappler/optimizers/
Dscoped_allocator_optimizer_test.cc98 TensorShapeProto shape_proto; in SetShapes() local
99 shape_proto.add_dim()->set_size(2); in SetShapes()
100 shape_proto.add_dim()->set_size(2); in SetShapes()
104 AddNodeAttr("_output_shapes", {shape_proto}, &n); in SetShapes()
/external/tensorflow/tensorflow/core/grappler/
Dgrappler_item_builder.cc265 TensorShapeProto shape_proto; in GrapplerItemFromMetaGraphDef() local
267 &shape_proto, &shape); in GrapplerItemFromMetaGraphDef()
459 TensorShapeProto shape_proto; in GrapplerItemFromMetaGraphDef() local
461 cfg, node.attr().at("shape").shape(), &shape_proto, &shape); in GrapplerItemFromMetaGraphDef()
485 shape_proto.clear_dim(); in GrapplerItemFromMetaGraphDef()
491 shape_proto.add_dim()->set_size(size); in GrapplerItemFromMetaGraphDef()
517 *(node.mutable_attr()->at("shape").mutable_shape()) = shape_proto; in GrapplerItemFromMetaGraphDef()
/external/tensorflow/tensorflow/core/nccl/
Dnccl_rewrite.cc184 TensorShapeProto shape_proto; in ReplaceBroadcast() local
185 TF_RETURN_IF_ERROR(GetNodeAttr(node->attrs(), "shape", &shape_proto)); in ReplaceBroadcast()
203 TensorProto tensor_proto = TensorFromShape(shape_proto); in ReplaceBroadcast()
204 bool is_fully_defined = TensorShape(shape_proto).IsFullyDefined(); in ReplaceBroadcast()
/external/tensorflow/tensorflow/core/ops/
Dmath_ops_test.cc219 auto shape_proto = [](std::initializer_list<int64> dim_sizes) { in TEST() local
225 TensorShapeProto i0 = shape_proto({1, -1}); in TEST()
226 TensorShapeProto i1 = shape_proto({-1, 2}); in TEST()
246 handle_data[2]->at(0).first = shape_proto({2, 2}); in TEST()
Darray_ops_test.cc139 auto* shape_proto = tensor_proto.mutable_tensor_shape(); in TEST() local
146 TensorShape{}.AsProto(shape_proto); in TEST()
149 TensorShape{1, 2, 3, 4}.AsProto(shape_proto); in TEST()
153 shape_proto->add_dim()->set_size(-1); in TEST()
1781 TensorShapeProto shape_proto; in TEST() local
1782 shape.AsProto(&shape_proto); in TEST()
1784 .Attr("shape", shape_proto) in TEST()
/external/tensorflow/tensorflow/core/framework/
Dtensor_util.cc179 TensorShapeProto* shape_proto) { in SetTensorProtoShape() argument
181 shape_proto->mutable_dim()->Add()->set_size(dim); in SetTensorProtoShape()
Dop_kernel_test.cc702 context->GetAttr(attr_name, &shape_proto)); in GetAttrKernel()
737 TensorShapeProto shape_proto; member in tensorflow::__anon74460fe50111::GetAttrKernel
833 EXPECT_EQ(get_attr_kernel->shape_proto.ShortDebugString(), "dim { size: 3 }"); in TEST_F()
Dtensor_util.h66 TensorShapeProto* shape_proto);
/external/tensorflow/tensorflow/python/ops/
Dresource_variable_ops.py1502 shape_proto = handle._handle_data.shape_and_type[0].shape
1503 if shape_proto.unknown_rank or any(x.size == -1 for x in shape_proto.dim):
1505 return constant_op.constant([x.size for x in shape_proto.dim], dtype=out_type)
/external/tensorflow/tensorflow/compiler/xla/service/llvm_ir/
Dllvm_util.cc250 ShapeProto shape_proto; in DecodeSelfDescribingShapeConstant() local
251 TF_RET_CHECK(shape_proto.ParseFromArray(shape_ptr, size_bytes)); in DecodeSelfDescribingShapeConstant()
252 Shape shape(shape_proto); in DecodeSelfDescribingShapeConstant()
/external/tensorflow/tensorflow/cc/framework/
Dcc_op_gen.cc134 string PrintTensorShape(const TensorShapeProto& shape_proto) { in PrintTensorShape() argument
135 PartialTensorShape shape(shape_proto); in PrintTensorShape()
/external/tensorflow/tensorflow/compiler/xla/service/
Dservice.cc831 for (const ShapeProto& shape_proto : arg->input_shape_with_layout()) { in Compile() local
832 argument_shapes.push_back(Shape(shape_proto)); in Compile()
Dhlo_instruction.cc449 for (const ShapeProto& shape_proto : in CreateFromProto() local
451 operand_shapes.emplace_back(shape_proto); in CreateFromProto()
/external/tensorflow/tensorflow/core/grappler/costs/
Dgraph_properties.cc374 auto* shape_proto = tensor_proto.mutable_tensor_shape(); in MakeTensorProtoFromShape() local
376 shape_proto->add_dim()->set_size(ic->Rank(tensor_as_shape)); in MakeTensorProtoFromShape()