/external/tensorflow/tensorflow/python/framework/ |
D | common_shapes_test.py | 33 def _assert_incompatible_broadcast(self, shape1, shape2): argument 34 if shape1.dims is not None and shape2.dims is not None: 35 zeros1 = np.zeros(shape1.as_list()) 41 self.assertFalse(common_shapes.is_broadcast_compatible(shape1, shape2)) 42 self.assertFalse(common_shapes.is_broadcast_compatible(shape2, shape1)) 44 common_shapes.broadcast_shape(shape1, shape2) 46 common_shapes.broadcast_shape(shape2, shape1) 50 def _assert_broadcast(self, expected, shape1, shape2): argument 51 if shape1.dims is not None and shape2.dims is not None: 53 zeros1 = np.zeros(shape1.as_list()) [all …]
|
/external/llvm-project/mlir/lib/Dialect/ |
D | Traits.cpp | 16 bool OpTrait::util::staticallyKnownBroadcastable(ArrayRef<int64_t> shape1, in staticallyKnownBroadcastable() argument 21 return llvm::all_of(llvm::zip(llvm::reverse(shape1), llvm::reverse(shape2)), in staticallyKnownBroadcastable() 33 bool OpTrait::util::getBroadcastedShape(ArrayRef<int64_t> shape1, in getBroadcastedShape() argument 45 if (shape1.size() > shape2.size()) { in getBroadcastedShape() 46 std::copy(shape1.begin(), shape1.end(), std::back_inserter(resultShape)); in getBroadcastedShape() 51 auto i1 = shape1.rbegin(), e1 = shape1.rend(); in getBroadcastedShape() 169 static bool areCompatibleShapes(ArrayRef<int64_t> shape1, in areCompatibleShapes() argument 174 if (shape1.size() != shape2.size()) in areCompatibleShapes() 176 for (auto p : llvm::zip(shape1, shape2)) in areCompatibleShapes()
|
/external/tensorflow/tensorflow/python/keras/layers/ |
D | merge.py | 51 def _compute_elemwise_op_output_shape(self, shape1, shape2): argument 67 if None in [shape1, shape2]: 69 elif len(shape1) < len(shape2): 70 return self._compute_elemwise_op_output_shape(shape2, shape1) 72 return shape1 73 output_shape = list(shape1[:-len(shape2)]) 74 for i, j in zip(shape1[-len(shape2):], shape2): 85 'together with shapes ' + str(shape1) + ' ' + str(shape2)) 665 shape1 = input_shape[0] 667 if shape1 is None or shape2 is None: [all …]
|
/external/tensorflow/tensorflow/python/keras/applications/ |
D | applications_load_weight_test.py | 96 def assertShapeEqual(self, shape1, shape2): argument 97 if len(shape1) != len(shape2): 99 'Shapes are different rank: %s vs %s' % (shape1, shape2)) 100 if shape1 != shape2: 101 raise AssertionError('Shapes differ: %s vs %s' % (shape1, shape2))
|
D | applications_test.py | 79 def assertShapeEqual(self, shape1, shape2): argument 80 if len(shape1) != len(shape2): 82 'Shapes are different rank: %s vs %s' % (shape1, shape2)) 83 for v1, v2 in zip(shape1, shape2): 85 raise AssertionError('Shapes differ: %s vs %s' % (shape1, shape2))
|
/external/tensorflow/tensorflow/compiler/xla/ |
D | shape_util_test.cc | 89 Shape shape1 = ShapeUtil::MakeShape(F32, {3, 2}); in TEST() local 91 ASSERT_TRUE(ShapeUtil::Compatible(shape1, shape2)); in TEST() 147 Shape shape1 = ShapeUtil::MakeShape(BF16, {3, 2}); in TEST() local 149 ASSERT_TRUE(ShapeUtil::CompatibleIgnoringFpPrecision(shape1, shape2)); in TEST() 153 Shape shape1 = ShapeUtil::MakeShape(BF16, {3, 2}); in TEST() local 155 ASSERT_FALSE(ShapeUtil::CompatibleIgnoringFpPrecision(shape1, shape2)); in TEST() 276 Shape shape1 = ShapeUtil::MakeShape(F32, {}); in TEST() local 279 EXPECT_FALSE(ShapeUtil::Compatible(shape1, shape2)); in TEST() 280 EXPECT_FALSE(ShapeUtil::Compatible(shape2, shape1)); in TEST() 281 EXPECT_FALSE(ShapeUtil::CompatibleIgnoringElementType(shape1, shape2)); in TEST() [all …]
|
/external/tensorflow/tensorflow/compiler/xla/python/ |
D | outfeed_receiver_test.cc | 167 const Shape shape1 = ShapeUtil::MakeShape(U32, {128}); in TEST() local 168 XlaOp data1 = Iota(&builder1, shape1, 0); in TEST() 182 EXPECT_EQ(ShapeUtil::MakeTupleShape({shape1}), received[1].data->shape()); in TEST() 210 const Shape shape1 = ShapeUtil::MakeShape(U32, {128}); in TEST() local 211 XlaOp data1 = Iota(&builder, shape1, 0); in TEST() 225 EXPECT_EQ(ShapeUtil::MakeTupleShape({shape1}), received[1].data->shape()); in TEST() 252 const Shape shape1 = ShapeUtil::MakeShape(U32, {128}); in TEST() local 253 XlaOp data1 = Iota(&builder, shape1, 0); in TEST()
|
/external/tensorflow/tensorflow/lite/delegates/gpu/gl/kernels/ |
D | elementwise_test.cc | 233 const BHWC shape1(1, 1, 1, 2); in TEST() local 236 /*inputs=*/{GetTensorRef(0, shape0), GetTensorRef(1, shape1)}, in TEST() 296 const BHWC shape1(1, 1, 1, 2); in TEST() local 299 /*inputs=*/{GetTensorRef(0, shape0), GetTensorRef(1, shape1)}, in TEST() 360 const BHWC shape1(1, 1, 1, 2); in TEST() local 363 /*inputs=*/{GetTensorRef(0, shape0), GetTensorRef(1, shape1)}, in TEST() 424 const BHWC shape1(1, 1, 1, 2); in TEST() local 427 /*inputs=*/{GetTensorRef(0, shape0), GetTensorRef(1, shape1)}, in TEST() 488 const BHWC shape1(1, 1, 1, 2); in TEST() local 491 /*inputs=*/{GetTensorRef(0, shape0), GetTensorRef(1, shape1)}, in TEST() [all …]
|
/external/tensorflow/tensorflow/lite/kernels/internal/reference/ |
D | process_broadcast_shapes.h | 39 const RuntimeShape& shape1, in ProcessBroadcastShapes() argument 42 std::max(shape0.DimensionsCount(), shape1.DimensionsCount()); in ProcessBroadcastShapes() 48 auto extended_shape1 = RuntimeShape::ExtendedShape(dims_count, shape1); in ProcessBroadcastShapes()
|
/external/llvm-project/mlir/lib/IR/ |
D | TypeUtilities.cpp | 54 LogicalResult mlir::verifyCompatibleShape(ArrayRef<int64_t> shape1, in verifyCompatibleShape() argument 56 if (shape1.size() != shape2.size()) in verifyCompatibleShape() 58 for (auto dims : llvm::zip(shape1, shape2)) { in verifyCompatibleShape()
|
/external/tensorflow/tensorflow/lite/swift/Tests/ |
D | TensorTests.swift | 95 let shape1 = Tensor.Shape(2, 2, 3) in testEquatable() variable 97 XCTAssertEqual(shape1, shape2) in testEquatable() 100 XCTAssertNotEqual(shape1, shape2) in testEquatable()
|
/external/llvm-project/mlir/include/mlir/Dialect/ |
D | Traits.h | 47 bool getBroadcastedShape(ArrayRef<int64_t> shape1, ArrayRef<int64_t> shape2, 62 bool staticallyKnownBroadcastable(ArrayRef<int64_t> shape1,
|
/external/XNNPACK/src/ |
D | runtime.c | 113 runtime->opdata[i].shape1.num_dims = values[node->inputs[0]].shape.num_dims; in xnn_create_runtime_v2() 118 runtime->opdata[i].shape1.dim[0] = values[node->inputs[0]].shape.dim[0]; in xnn_create_runtime_v2() 119 …runtime->opdata[i].shape1.dim[1] = values[node->inputs[0]].shape.dim[values[node->inputs[0]].shape… in xnn_create_runtime_v2() 121 …memcpy(&runtime->opdata[i].shape1.dim[2], &values[node->inputs[0]].shape.dim[1], (values[node->inp… in xnn_create_runtime_v2() 132 …memcpy(runtime->opdata[i].shape1.dim, values[node->inputs[0]].shape.dim, values[node->inputs[0]].s… in xnn_create_runtime_v2() 434 runtime->opdata[i].shape1.num_dims = values[node->inputs[0]].shape.num_dims; in xnn_create_runtime_v2() 436 …memcpy(runtime->opdata[i].shape1.dim, values[node->inputs[0]].shape.dim, values[node->inputs[0]].s… in xnn_create_runtime_v2() 587 runtime->opdata[i].shape1.num_dims = values[node->inputs[0]].shape.num_dims; in xnn_create_runtime_v2() 589 …memcpy(runtime->opdata[i].shape1.dim, values[node->inputs[0]].shape.dim, values[node->inputs[0]].s… in xnn_create_runtime_v2() 602 runtime->opdata[i].shape1.num_dims = values[node->inputs[0]].shape.num_dims; in xnn_create_runtime_v2() [all …]
|
/external/tensorflow/tensorflow/security/advisory/ |
D | tfsa-2020-008.md | 12 inline int MatchingDim(const RuntimeShape& shape1, int index1, 14 TFLITE_DCHECK_EQ(shape1.Dims(index1), shape2.Dims(index2)); 15 return shape1.Dims(index1);
|
/external/tensorflow/tensorflow/compiler/jit/ |
D | encapsulate_subgraphs_pass_test.cc | 1033 GraphDefBuilder shape1(GraphDefBuilder::kFailImmediately); in TEST() local 1034 Node* key_constant = KeyPlaceholder("F1", shape1.opts()); in TEST() 1037 shape1.opts().WithAttr(kXlaHasHostTransferAttrName, true)); in TEST() 1039 shape1.opts() in TEST() 1044 shape1.opts().WithAttr(kXlaHasHostTransferAttrName, true)); in TEST() 1046 AddGraphDefToFunctionLibrary(shape1, "F1_F1_O1", &library_expected)); in TEST() 1740 GraphDefBuilder shape1(GraphDefBuilder::kFailImmediately); in TEST() local 1741 Node* key_constant = KeyPlaceholder("F1", shape1.opts()); in TEST() 1744 shape1.opts().WithAttr(kXlaHasHostTransferAttrName, true)); in TEST() 1745 Node* e = Unary(ops::NodeOut(recv1, 0), shape1.opts() in TEST() [all …]
|
/external/gemmlowp/test/ |
D | benchmark_all_sizes.cc | 216 bool operator<(const Shape& shape1, const Shape& shape2) { in operator <() argument 217 return shape1.depth < shape2.depth || in operator <() 218 (shape1.depth == shape2.depth && in operator <() 219 (shape1.rows < shape2.rows || in operator <() 220 (shape1.rows == shape2.rows && shape1.cols < shape2.cols))); in operator <()
|
/external/tensorflow/tensorflow/core/kernels/ |
D | set_kernels.cc | 380 Status CheckShapesMatch(VarDimArray shape1, VarDimArray shape2) { in CheckShapesMatch() argument 381 if (shape1 != shape2) { in CheckShapesMatch() 383 absl::StrJoin(shape1, ","), "] vs [", in CheckShapesMatch() 391 Status GroupShapeFromInputs(VarDimArray shape1, VarDimArray shape2, in GroupShapeFromInputs() argument 394 TF_RETURN_IF_ERROR(GroupShape(shape1, &group_shape_1)); in GroupShapeFromInputs() 434 const auto shape1 = TensorShapeToArray(set1_t.shape()); in ComputeDenseToDense() local 436 OP_REQUIRES_OK(ctx, GroupShapeFromInputs(shape1, shape2, &group_shape)); in ComputeDenseToDense() 438 const auto set1_strides = Strides(shape1); in ComputeDenseToDense()
|
D | segment_reduction_ops_test.cc | 50 TensorShape shape1({num_rows, num_cols}); in BM_SegmentReduction() local 51 Tensor input1(DT_FLOAT, shape1); in BM_SegmentReduction()
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/tests/ |
D | constant-fold.mlir | 173 %shape1 = constant dense<[2, 3, 7]> : tensor<3xi32> 180 …%offset:3 = "tf.ConcatOffset"(%concat_dim, %shape0, %shape1, %shape2) : (tensor<i32>, tensor<3xi32… 190 %shape1 = constant dense<[0, 3, 0]> : tensor<3xi32> 198 …%offset:4 = "tf.ConcatOffset"(%concat_dim, %shape0, %shape1, %shape2, %shape3) : (tensor<i32>, ten… 208 %shape1 = constant dense<[2, 8, 5]> : tensor<3xi32> 215 …%offset:3 = "tf.ConcatOffset"(%concat_dim, %shape0, %shape1, %shape2) : (tensor<i32>, tensor<3xi32… 224 %shape1 = constant dense<[2, 3, 7]> : tensor<3xi32> 227 …%offset:2 = "tf.ConcatOffset"(%concat_dim, %shape0, %shape1) : (tensor<i32>, tensor<3xi32>, tensor… 233 func @testConcatOffsetNonConstShape(%shape1: tensor<3xi32>) -> (tensor<3xi32>, tensor<3xi32>) { 238 …%offset:2 = "tf.ConcatOffset"(%concat_dim, %shape0, %shape1) : (tensor<i32>, tensor<3xi32>, tensor… [all …]
|
/external/tensorflow/tensorflow/compiler/mlir/lite/tests/ |
D | canonicalize.mlir | 19 %shape1 = constant dense<[64]> : tensor<1xi32> 21 %1 = "tfl.reshape"(%0, %shape1) : (tensor<16x4xf32>, tensor<1xi32>) -> tensor<64xf32> 35 %shape1 = constant dense<[64]> : tensor<1xi32> 37 %1 = "tfl.reshape"(%0, %shape1) : (tensor<16x4xf32>, tensor<1xi32>) -> tensor<64xf32> 38 %2 = "tfl.reshape"(%0, %shape1) : (tensor<16x4xf32>, tensor<1xi32>) -> tensor<64xf32> 55 %shape1 = constant dense<[64]> : tensor<1xi32> 57 %1 = "tfl.reshape"(%0, %shape1) : (tensor<16x4xf32>, tensor<1xi32>) -> tensor<64xf32>
|
/external/tensorflow/tensorflow/core/grappler/optimizers/ |
D | shape_optimizer.cc | 169 const TensorShapeProto& shape1 = prop1[0].shape(); in Optimize() local 171 int64 result = ComputeSizeRatio(shape1, shape2); in Optimize()
|
/external/llvm-project/mlir/test/Dialect/Standard/ |
D | ops.mlir | 70 func @memref_reshape(%unranked: memref<*xf32>, %shape1: memref<1xi32>, 72 %dyn_vec = memref_reshape %unranked(%shape1)
|
/external/tensorflow/tensorflow/python/ops/ |
D | image_ops_impl.py | 3997 shape1 = img1.get_shape().with_rank_at_least(3) 3999 shape1[-3:].assert_is_compatible_with(shape2[-3:]) 4001 if shape1.ndims is not None and shape2.ndims is not None: 4003 reversed(shape1.dims[:-3]), reversed(shape2.dims[:-3])): 4006 (shape1, shape2)) 4009 shape1, shape2 = array_ops.shape_n([img1, img2]) 4015 math_ops.greater_equal(array_ops.size(shape1), 3), [shape1, shape2], 4019 math_ops.reduce_all(math_ops.equal(shape1[-3:], shape2[-3:])), 4020 [shape1, shape2], 4022 return shape1, shape2, checks [all …]
|
/external/tensorflow/tensorflow/core/ops/ |
D | io_ops.cc | 94 ShapeHandle shape0, shape1, shape2; in __anon52e493120302() local 96 TF_RETURN_IF_ERROR(c->WithRank(c->input(1), 1, &shape1)); in __anon52e493120302() 98 TF_RETURN_IF_ERROR(c->Merge(shape1, shape2, &shape0)); in __anon52e493120302()
|
/external/llvm-project/mlir/include/mlir/IR/ |
D | TypeUtilities.h | 48 LogicalResult verifyCompatibleShape(ArrayRef<int64_t> shape1,
|