Home
last modified time | relevance | path

Searched refs:shape_proto (Results 1 – 25 of 29) 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.cc1411 void SetDefaultLayoutOnProto(ShapeProto* shape_proto) { in SetDefaultLayoutOnProto() argument
1412 CHECK(ShapeUtil::IsArrayPrimitiveType(shape_proto->element_type())); in SetDefaultLayoutOnProto()
1413 shape_proto->mutable_layout()->set_format(DENSE); in SetDefaultLayoutOnProto()
1415 shape_proto->mutable_layout()->mutable_minor_to_major(); in SetDefaultLayoutOnProto()
1416 minor_to_major->Resize(shape_proto->dimensions_size(), 0); in SetDefaultLayoutOnProto()
/external/tensorflow/tensorflow/core/ops/
Dragged_to_dense_util_test.cc31 TensorShapeProto shape_proto; in TEST() local
32 shape_proto.set_unknown_rank(true); in TEST()
39 ragged_rank, shape_proto, value_shape_proto, &actual_output_shape_proto)); in TEST()
45 TensorShapeProto shape_proto; in TEST() local
46 shape_proto.set_unknown_rank(true); in TEST()
53 ragged_rank, shape_proto, value_shape_proto, &actual_output_shape_proto)); in TEST()
61 TensorShapeProto shape_proto; in TEST() local
62 shape_proto.set_unknown_rank(true); in TEST()
70 ragged_rank, shape_proto, value_shape_proto, &actual_output_shape_proto)); in TEST()
Dfunction_ops.cc52 const TensorShapeProto& shape_proto = shape_attr->list().shape(0); in __anona02766840102() local
55 context->MakeShapeFromShapeProto(shape_proto, &shape_handle)); in __anona02766840102()
71 const TensorShapeProto& shape_proto = shape_attr->list().shape(0); in __anona02766840102() local
74 context->MakeShapeFromShapeProto(shape_proto, &shape_handle)); in __anona02766840102()
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()
1800 TensorShapeProto shape_proto; in TEST() local
1801 shape.AsProto(&shape_proto); in TEST()
1803 .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/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/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.cc137 TensorShapeProto shape_proto; in UpdatePlaceholderShape() local
139 cfg, node->attr().at("shape").shape(), &shape_proto, &shape); in UpdatePlaceholderShape()
163 shape_proto.clear_dim(); in UpdatePlaceholderShape()
169 shape_proto.add_dim()->set_size(size); in UpdatePlaceholderShape()
197 if (!shape_proto.dim().empty()) in UpdatePlaceholderShape()
198 *(node->mutable_attr()->at("shape").mutable_shape()) = shape_proto; in UpdatePlaceholderShape()
364 TensorShapeProto shape_proto; in GrapplerItemFromMetaGraphDef() local
366 &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/grappler/optimizers/
Dscoped_allocator_optimizer_test.cc241 TensorShapeProto shape_proto; in SetShapes() local
242 shape_proto.add_dim()->set_size(2); in SetShapes()
243 shape_proto.add_dim()->set_size(2); in SetShapes()
247 AddNodeAttr("_output_shapes", {shape_proto}, &n); in SetShapes()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Dtpu_rewrite_pass.cc222 tensorflow::TensorShapeProto shape_proto; in SetMetadataProtoFromLaunchFuncOp() local
223 ConvertToTensorShapeProto(ranked_tensor_type.getShape(), &shape_proto); in SetMetadataProtoFromLaunchFuncOp()
224 *arg->mutable_shape() = std::move(shape_proto); in SetMetadataProtoFromLaunchFuncOp()
/external/tensorflow/tensorflow/compiler/xla/service/cpu/
Dcpu_runtime.cc128 xla::ShapeProto shape_proto; in DecodeSelfDescribingShapeConstant() local
129 if (!shape_proto.ParseFromArray(shape_ptr, size_bytes)) { in DecodeSelfDescribingShapeConstant()
132 xla::Shape shape(shape_proto); in DecodeSelfDescribingShapeConstant()
/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.cc184 TensorShapeProto* shape_proto) { in SetTensorProtoShape() argument
186 shape_proto->mutable_dim()->Add()->set_size(dim); in SetTensorProtoShape()
Dfunction_test.cc1498 TensorShapeProto* shape_proto = shape_attr.mutable_list()->add_shape(); in TEST() local
1499 shape_proto->add_dim()->set_size(2); in TEST()
1500 shape_proto->add_dim()->set_size(4); in TEST()
1501 shape_proto->add_dim()->set_size(6); in TEST()
1502 shape_proto->add_dim()->set_size(8); in TEST()
Dop_kernel_test.cc834 context->GetAttr(attr_name, &shape_proto)); in GetAttrKernel()
869 TensorShapeProto shape_proto; member in tensorflow::__anonf4c990e70111::GetAttrKernel
965 EXPECT_EQ(get_attr_kernel->shape_proto.ShortDebugString(), "dim { size: 3 }"); in TEST_F()
Dtensor_util.h70 TensorShapeProto* shape_proto);
/external/tensorflow/tensorflow/python/ops/
Dresource_variable_ops.py1963 shape_proto = handle._handle_data.shape_and_type[0].shape # pylint: disable=protected-access
1964 if shape_proto.unknown_rank or any(x.size == -1 for x in shape_proto.dim):
1966 return constant_op.constant([x.size for x in shape_proto.dim], dtype=out_type)
/external/tensorflow/tensorflow/core/common_runtime/
Dprocess_function_library_runtime.cc350 TensorShapeProto shape_proto; in SetArgShape() local
351 dtype_and_shape_iter->second.shape.AsProto(&shape_proto); in SetArgShape()
353 *shape_attr_value.mutable_list()->add_shape() = shape_proto; in SetArgShape()
/external/tensorflow/tensorflow/cc/framework/
Dcc_op_gen.cc140 string PrintTensorShape(const TensorShapeProto& shape_proto) { in PrintTensorShape() argument
141 PartialTensorShape shape(shape_proto); in PrintTensorShape()

12