Home
last modified time | relevance | path

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

12

/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.h40 explicit Shape(const ShapeProto& shape_proto);
Dliteral_test.cc1517 void SetDefaultLayoutOnProto(ShapeProto* shape_proto) { in SetDefaultLayoutOnProto() argument
1518 CHECK(ShapeUtil::IsArrayPrimitiveType(shape_proto->element_type())); in SetDefaultLayoutOnProto()
1519 shape_proto->mutable_layout()->set_format(DENSE); in SetDefaultLayoutOnProto()
1521 shape_proto->mutable_layout()->mutable_minor_to_major(); in SetDefaultLayoutOnProto()
1522 minor_to_major->Resize(shape_proto->dimensions_size(), 0); in SetDefaultLayoutOnProto()
/external/tensorflow/tensorflow/core/util/
Dragged_to_dense_util_test.cc30 TensorShapeProto shape_proto; in TEST() local
31 shape_proto.set_unknown_rank(true); in TEST()
38 ragged_rank, shape_proto, value_shape_proto, &actual_output_shape_proto)); in TEST()
44 TensorShapeProto shape_proto; in TEST() local
45 shape_proto.set_unknown_rank(true); in TEST()
52 ragged_rank, shape_proto, value_shape_proto, &actual_output_shape_proto)); in TEST()
60 TensorShapeProto shape_proto; in TEST() local
61 shape_proto.set_unknown_rank(true); in TEST()
69 ragged_rank, shape_proto, value_shape_proto, &actual_output_shape_proto)); in TEST()
/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()
Dshape_inference.cc115 TensorShapeProto shape_proto; in PropagateShapes() local
116 context->ShapeHandleToProto(handle, &shape_proto); in PropagateShapes()
117 if (!shape_proto.unknown_rank()) { in PropagateShapes()
129 shape_proto.dim_size()); in PropagateShapes()
130 for (const auto& dim : shape_proto.dim()) { in PropagateShapes()
/external/tensorflow/tensorflow/core/ops/
Dfunction_ops.cc44 const TensorShapeProto& shape_proto = shape_attr->list().shape(0); in __anonfc9946590102() local
47 context->MakeShapeFromShapeProto(shape_proto, &shape_handle)); in __anonfc9946590102()
78 const TensorShapeProto& shape_proto = shape_attr->list().shape(0); in __anonfc9946590102() local
81 context->MakeShapeFromShapeProto(shape_proto, &shape_handle)); in __anonfc9946590102()
Darray_ops_test.cc172 auto* shape_proto = tensor_proto.mutable_tensor_shape(); in TEST() local
179 TensorShape{}.AsProto(shape_proto); in TEST()
182 TensorShape{1, 2, 3, 4}.AsProto(shape_proto); in TEST()
186 shape_proto->add_dim()->set_size(-1); in TEST()
1847 TensorShapeProto shape_proto; in TEST() local
1848 shape.AsProto(&shape_proto); in TEST()
1850 .Attr("shape", shape_proto) in TEST()
Dmath_ops_test.cc240 auto shape_proto = [](std::initializer_list<int64> dim_sizes) { in TEST() local
266 handle_data[2]->at(0).first = shape_proto({2, 2}); 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/
Dgrappler_item_builder.cc138 TensorShapeProto shape_proto; in UpdatePlaceholderShape() local
140 cfg, node->attr().at("shape").shape(), &shape_proto, &shape); in UpdatePlaceholderShape()
164 shape_proto.clear_dim(); in UpdatePlaceholderShape()
170 shape_proto.add_dim()->set_size(size); in UpdatePlaceholderShape()
198 if (!shape_proto.dim().empty()) in UpdatePlaceholderShape()
199 *(node->mutable_attr()->at("shape").mutable_shape()) = shape_proto; in UpdatePlaceholderShape()
365 TensorShapeProto shape_proto; in GrapplerItemFromMetaGraphDef() local
367 &shape_proto, &shape); 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/tpu/kernels/xla/
Dhost_compute_ops.cc353 TensorShapeProto shape_proto; in InferOutputShapes() local
354 shape_ctx->ShapeHandleToProto(handle, &shape_proto); in InferOutputShapes()
355 (*output_shapes)[i] = TensorShape(shape_proto); in InferOutputShapes()
356 VLOG(2) << "Inferred shape " << shape_proto.DebugString(); in InferOutputShapes()
/external/tensorflow/tensorflow/core/grappler/optimizers/
Dscoped_allocator_optimizer_test.cc271 TensorShapeProto shape_proto; in SetShapes() local
272 shape_proto.add_dim()->set_size(2); in SetShapes()
273 shape_proto.add_dim()->set_size(2); in SetShapes()
277 AddNodeAttr("_output_shapes", {shape_proto}, &n); in SetShapes()
/external/tensorflow/tensorflow/core/kernels/
Dragged_tensor_to_tensor_op.cc154 TensorShapeProto shape_proto; in CalculateOutputSize() local
159 partial_tensor_shape.AsProto(&shape_proto); in CalculateOutputSize()
163 ragged_rank_, shape_proto, value_shape_proto, &output_shape_proto)); in CalculateOutputSize()
/external/tensorflow/tensorflow/python/ops/linalg/sparse/
Dsparse_csr_matrix_ops.py59 def _create_handle_data_proto(shape_proto, dtype_enum): argument
67 shape=shape_proto, dtype=dtype_enum)
/external/tensorflow/tensorflow/core/framework/
Dtensor_util.cc186 TensorShapeProto* shape_proto) { in SetTensorProtoShape() argument
188 shape_proto->mutable_dim()->Add()->set_size(dim); in SetTensorProtoShape()
Dfunction_test.cc1508 TensorShapeProto* shape_proto = shape_attr.mutable_list()->add_shape(); in TEST() local
1509 shape_proto->add_dim()->set_size(2); in TEST()
1510 shape_proto->add_dim()->set_size(4); in TEST()
1511 shape_proto->add_dim()->set_size(6); in TEST()
1512 shape_proto->add_dim()->set_size(8); in TEST()
Dop_kernel_test.cc775 context->GetAttr(attr_name, &shape_proto)); in GetAttrKernel()
810 TensorShapeProto shape_proto; member in tensorflow::__anon843475bc0111::GetAttrKernel
906 EXPECT_EQ(get_attr_kernel->shape_proto.ShortDebugString(), "dim { size: 3 }"); in TEST_F()
Dtensor_util.h70 TensorShapeProto* shape_proto);
/external/tensorflow/tensorflow/core/tpu/
Dtpu_execute.cc454 for (const xla::ShapeProto& shape_proto : executable.input_shapes()) { in TPUExecute() local
455 xla::Shape shape(shape_proto); in TPUExecute()
/external/tensorflow/tensorflow/compiler/xla/service/cpu/
Dcpu_runtime.cc190 xla::ShapeProto shape_proto; in DecodeSelfDescribingShapeConstant() local
191 if (!shape_proto.ParseFromArray(shape_ptr, size_bytes)) { in DecodeSelfDescribingShapeConstant()
194 xla::Shape shape(shape_proto); in DecodeSelfDescribingShapeConstant()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Dtpu_rewrite_pass.cc255 tensorflow::TensorShapeProto shape_proto; in SetMetadataProtoArgs() local
256 ConvertToTensorShapeProto(ranked_tensor_type.getShape(), &shape_proto); in SetMetadataProtoArgs()
257 *arg->mutable_shape() = std::move(shape_proto); in SetMetadataProtoArgs()
/external/tensorflow/tensorflow/python/ops/
Dresource_variable_ops.py2148 shape_proto = handle._handle_data.shape_and_type[0].shape # pylint: disable=protected-access
2149 if shape_proto.unknown_rank or any(x.size == -1 for x in shape_proto.dim):
2151 return constant_op.constant([x.size for x in shape_proto.dim], dtype=out_type)

12