/external/llvm-project/flang/test/Evaluate/ |
D | folding06.f90 | 21 integer(8), parameter :: new_shape(*) = [2, 4] variable 28 integer(4), parameter :: int_expected_result(*, *) = reshape([1, 5, 2, 6, 3, 7, 4, 8], new_shape) 29 integer(4), parameter :: int_result(*, *) = reshape(int_source, new_shape, int_pad, order) 30 …ger(4), parameter :: int_result_long_source(*, *) = reshape([1, 5, 2, 6, 3, 7, 4, 8, 9], new_shape) 32 logical, parameter :: test_reshape_integer_2 = all(shape(int_result, 8).EQ.new_shape) 41 reshape(["abc", "mno", "def", "pqr", "ghi", "stu", "jkl", "vxy"], new_shape) 44 reshape(char_source, new_shape, char_pad, order) 47 logical, parameter :: test_reshape_char_2 = all(shape(char_result, 8).EQ.new_shape) 58 a(x=3.5_4,i=3_8),a(x=7.5_4,i=7_8),a(x=4.5_4,i=4_8),a(x=8.5_4,i=8_8)], new_shape) 60 …type(A), parameter :: derived_result(*, *) = reshape(derived_source, new_shape, derived_pad, order) [all …]
|
/external/tensorflow/tensorflow/lite/delegates/gpu/common/ |
D | operations.cc | 604 BHWC new_shape = input[0]; in CalculateOutputShape() local 608 if (input[i].h != new_shape.h || input[i].w != new_shape.w || in CalculateOutputShape() 609 input[i].b != new_shape.b) { in CalculateOutputShape() 614 new_shape.c += input[i].c; in CalculateOutputShape() 619 if (input[i].w != new_shape.w || input[i].c != new_shape.c || in CalculateOutputShape() 620 input[i].b != new_shape.b) { in CalculateOutputShape() 625 new_shape.h += input[i].h; in CalculateOutputShape() 630 if (input[i].h != new_shape.h || input[i].c != new_shape.c || in CalculateOutputShape() 631 input[i].b != new_shape.b) { in CalculateOutputShape() 636 new_shape.w += input[i].w; in CalculateOutputShape() [all …]
|
/external/tensorflow/tensorflow/lite/testing/op_tests/ |
D | shape.py | 50 new_shape = tf.compat.v1.placeholder( 52 reshaped = tf.reshape(input_value, shape=new_shape) 54 return [input_value, new_shape], [out] 59 new_shape = np.array(parameters["new_shape"]) 60 return [input_value, new_shape], sess.run( 61 outputs, feed_dict=dict(zip(inputs, [input_value, new_shape])))
|
/external/tensorflow/tensorflow/compiler/xla/service/cpu/ |
D | cpu_layout_assignment.cc | 81 Shape new_shape(old_shape); in RowMajorShape() local 82 std::vector<int64> dimension_order(new_shape.dimensions_size()); in RowMajorShape() 84 *new_shape.mutable_layout() = LayoutUtil::MakeLayout(dimension_order); in RowMajorShape() 85 return new_shape; in RowMajorShape() 89 Shape new_shape(old_shape); in ColMajorShape() local 90 std::vector<int64> dimension_order(new_shape.dimensions_size()); in ColMajorShape() 92 *new_shape.mutable_layout() = LayoutUtil::MakeLayout(dimension_order); in ColMajorShape() 93 return new_shape; in ColMajorShape()
|
/external/tensorflow/tensorflow/core/api_def/base_api/ |
D | api_def_SparseReshape.pbtxt | 17 name: "new_shape" 33 SparseTensor. This is the same as `new_shape` but with any -1 dimensions 40 tensor. The `input_indices` are recomputed based on the requested `new_shape`. 42 If one component of `new_shape` is the special value -1, the size of that 44 most one component of `new_shape` can be -1. The number of dense elements 45 implied by `new_shape` must be the same as the number of dense elements 50 If the input tensor has rank `R_in` and `N` non-empty values, and `new_shape`
|
/external/tensorflow/tensorflow/lite/ |
D | string_util_test.cc | 70 auto new_shape = TfLiteIntArrayCreate(2); in TEST() local 71 new_shape->data[0] = 2; in TEST() 72 new_shape->data[1] = 1; in TEST() 73 buf0.WriteToTensor(t0, new_shape); in TEST() 186 auto new_shape = TfLiteIntArrayCreate(2); in TEST() local 187 new_shape->data[0] = 1; in TEST() 188 new_shape->data[1] = 2; in TEST() 190 buf.WriteToTensor(t0, new_shape); in TEST()
|
D | string_util.cc | 108 TfLiteIntArray* new_shape) { in WriteToTensor() argument 112 if (new_shape == nullptr) { in WriteToTensor() 113 new_shape = TfLiteIntArrayCopy(tensor->dims); in WriteToTensor() 117 TfLiteTensorReset(tensor->type, tensor->name, new_shape, tensor->params, in WriteToTensor()
|
/external/tensorflow/tensorflow/lite/kernels/internal/reference/ |
D | batch_to_space_nd.h | 31 RuntimeShape new_shape(4, 1); in ExtendShapeBatchToSpace() 32 new_shape.SetDim(0, shape.Dims(0)); in ExtendShapeBatchToSpace() 33 new_shape.SetDim(1, shape.Dims(1)); in ExtendShapeBatchToSpace() 34 new_shape.SetDim(3, shape.Dims(2)); in ExtendShapeBatchToSpace() 35 return new_shape; in ExtendShapeBatchToSpace()
|
D | space_to_batch_nd.h | 32 RuntimeShape new_shape(4, 1); in ExtendShapeSpaceToBatch() 33 new_shape.SetDim(0, shape.Dims(0)); in ExtendShapeSpaceToBatch() 34 new_shape.SetDim(1, shape.Dims(1)); in ExtendShapeSpaceToBatch() 35 new_shape.SetDim(3, shape.Dims(2)); in ExtendShapeSpaceToBatch() 36 return new_shape; in ExtendShapeSpaceToBatch()
|
/external/tensorflow/tensorflow/compiler/xla/service/gpu/ |
D | cudnn_pad_for_convolutions.cc | 46 const Shape& new_shape) { in PadInstruction() argument 57 if (shape.dimensions(dim) == new_shape.dimensions(dim)) { in PadInstruction() 60 CHECK_GT(new_shape.dimensions(dim), shape.dimensions(dim)); in PadInstruction() 62 new_shape.dimensions(dim) - shape.dimensions(dim)); in PadInstruction() 70 HloInstruction::CreatePad(new_shape, instr, zero, pad_config)); in PadInstruction() 245 const Shape& new_shape) { in TryResolvePaddedShapesForTensorCore() argument 247 int64 new_bytes = ShapeUtil::ByteSizeOf(new_shape); in TryResolvePaddedShapesForTensorCore() 255 << ShapeUtil::HumanString(new_shape) << ", a size increase of " in TryResolvePaddedShapesForTensorCore() 354 const Shape& new_shape) { in TryResolvePaddedShapesForIntegerConvolution() argument 356 int64 new_bytes = ShapeUtil::ByteSizeOf(new_shape); in TryResolvePaddedShapesForIntegerConvolution() [all …]
|
D | variadic_op_splitter.cc | 58 Shape new_shape = concat->shape(); in SplitConcatenate() local 66 new_shape.set_dimensions(concat->concatenate_dimension(), in SplitConcatenate() 69 new_shape, operands_span.subspan(offset, kMaxParameters))); in SplitConcatenate()
|
D | gpu_conv_rewriter.cc | 108 Shape new_shape = lhs->shape(); in ConvertBatchGroupedToFeatureGroupedConvolution() local 109 new_shape.DeleteDimension(input_feature_dimension); in ConvertBatchGroupedToFeatureGroupedConvolution() 110 new_shape.set_dimensions(input_feature_dimension, input_feature * num_groups); in ConvertBatchGroupedToFeatureGroupedConvolution() 111 lhs = add(HloInstruction::CreateReshape(new_shape, lhs)); in ConvertBatchGroupedToFeatureGroupedConvolution() 600 Shape new_shape = rhs->shape(); in MatchBackwardInput() local 601 new_shape.DeleteDimension(output_feature_dimension); in MatchBackwardInput() 602 new_shape.set_dimensions(output_feature_dimension, in MatchBackwardInput() 604 rhs = c->AddInstruction(HloInstruction::CreateReshape(new_shape, rhs)); in MatchBackwardInput()
|
/external/XNNPACK/src/subgraph/ |
D | static-reshape.c | 20 const size_t* new_shape, in xnn_define_static_reshape() argument 57 node->params.static_reshape.new_shape.num_dims = num_dims; in xnn_define_static_reshape() 58 memcpy(&node->params.static_reshape.new_shape.dim, new_shape, num_dims * sizeof(size_t)); in xnn_define_static_reshape()
|
/external/tensorflow/tensorflow/lite/delegates/gpu/gl/kernels/ |
D | resize_test.cc | 44 attr.new_shape = HW(2, 2); in TEST() 69 attr.new_shape = HW(1, 4); in TEST() 93 attr.new_shape = HW(4, 4); in TEST() 120 attr.new_shape = HW(3, 3); in TEST() 146 attr.new_shape = HW(3, 3); in TEST() 171 attr.new_shape = HW(2, 4); in TEST() 197 attr.new_shape = HW(3, 3); in TEST() 223 attr.new_shape = HW(3, 3); in TEST()
|
D | reshape.cc | 45 if (attr.new_shape.h != ctx.output_shapes[0][1] || in GenerateCode() 46 attr.new_shape.w != ctx.output_shapes[0][2] || in GenerateCode() 47 attr.new_shape.c != ctx.output_shapes[0][3]) { in GenerateCode()
|
D | reshape_test.cc | 45 attr.new_shape = output.shape; 67 attr.new_shape = output.shape; 89 attr.new_shape = output.shape; 110 attr.new_shape = output.shape; in TEST()
|
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/ |
D | shape_op.cc | 253 std::vector<int64> new_shape(existing_dims_size); in Compile() local 254 for (size_t i = 0; i < new_shape.size(); ++i) { in Compile() 255 new_shape[i] = existing_dims[i]; in Compile() 266 new_shape.emplace(new_shape.begin() + dim, 1); in Compile() 268 ctx->SetOutput(0, xla::Reshape(ctx->Input("input"), new_shape)); in Compile() 286 std::vector<int64> new_shape; in Compile() local 316 new_shape.push_back(existing_dim); in Compile() 321 new_shape.push_back(existing_dim); in Compile() 326 ctx->SetOutput(0, xla::Reshape(ctx->Input(0), new_shape)); in Compile()
|
D | dynamic_stitch_op.cc | 154 TensorShape new_shape; in Compile() local 156 new_shape.AddDim(indices[input_num].shape().dimensions(0)); in Compile() 159 new_shape.AddDim(data0_shape.dim_size(d)); in Compile() 163 if (new_shape == data_shapes[input_num]) { in Compile() 166 input[input_num] = xla::Reshape(handle, new_shape.dim_sizes()); in Compile()
|
/external/tensorflow/tensorflow/lite/delegates/gpu/common/tasks/ |
D | resize_test_util.cc | 35 attr.new_shape = HW(4, 4); in ResizeBilinearAlignedTest() 67 attr.new_shape = HW(4, 4); in ResizeBilinearNonAlignedTest() 99 attr.new_shape = HW(3, 3); in ResizeBilinearWithoutHalfPixelTest() 131 attr.new_shape = HW(3, 3); in ResizeBilinearWithHalfPixelTest() 164 attr.new_shape = HW(2, 4); in ResizeNearestTest() 196 attr.new_shape = HW(3, 3); in ResizeNearestAlignCornersTest() 228 attr.new_shape = HW(3, 3); in ResizeNearestHalfPixelCentersTest()
|
/external/tensorflow/tensorflow/python/ops/parallel_for/ |
D | gradients.py | 74 new_shape = array_ops.concat( 76 out = array_ops.reshape(out, new_shape) 146 new_shape = array_ops.concat([output_shape, inp_shape[1:]], axis=0) 147 return array_ops.reshape(output, new_shape)
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/ |
D | tpu_space_to_depth_pass.cc | 129 LogicalResult HandleCast(TF::CastOp cast_op, ArrayRef<int64_t> new_shape) { in HandleCast() argument 133 RankedTensorType::get(new_shape, getElementTypeOrSelf(cast_input)); in HandleCast() 147 RankedTensorType::get(new_shape, getElementTypeOrSelf(cast_input)); in HandleCast() 239 TF::ReshapeOp GetReshapeOpForConv2DFilter(ArrayRef<int64_t> new_shape, in GetReshapeOpForConv2DFilter() argument 242 RankedTensorType::get(new_shape, getElementTypeOrSelf(input)); in GetReshapeOpForConv2DFilter() 244 {static_cast<int64_t>(new_shape.size())}, builder->getIntegerType(64)); in GetReshapeOpForConv2DFilter() 245 auto reshape_sizes = DenseIntElementsAttr::get(reshape_type, new_shape); in GetReshapeOpForConv2DFilter() 293 SmallVector<int64_t, 6> new_shape = { in HandleConv2DFilter() local 297 GetReshapeOpForConv2DFilter(new_shape, before_reshape_value, &builder); in HandleConv2DFilter() 359 SmallVector<int64_t, 4> new_shape(new_filter_shape.begin(), in HandleConv2DBackPropFilter() local [all …]
|
/external/tensorflow/tensorflow/compiler/xla/service/ |
D | reshape_mover.cc | 143 const Shape new_shape = in UpdateOperand() local 151 HloInstruction::CreateReshape(new_shape, operand)); in UpdateOperand() 158 new_shape, operand, inverse_permutation)); in UpdateOperand() 165 operand->CloneWithNewOperands(new_shape, operand->operands())); in UpdateOperand() 175 operand->CloneWithNewOperands(new_shape, operand->operands())); in UpdateOperand()
|
D | conditional_canonicalizer.cc | 36 auto new_shape = ShapeUtil::MakeTupleShape({root_shape}); in CanonicalizeNonTupleConditional() local 38 parent->AddInstruction(conditional->CloneWithNewShape(new_shape)); in CanonicalizeNonTupleConditional()
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
D | sparse_ops_test.py | 359 new_shape = np.array([3, 6, 7], dtype=np.int64) 360 sp_output = sparse_ops.sparse_reset_shape(sp_input, new_shape) 366 new_shape = np.array([3, 6, 7], dtype=np.int64) 367 sp_output = sparse_ops.sparse_reset_shape(sp_input, new_shape) 379 new_shape = np.array([3, 6, 7], dtype=np.int64) 380 sp_output = sparse_ops.sparse_reset_shape(sp_input, new_shape) 393 new_shape = np.array([3, 6, 7], dtype=np.int64) 394 sp_output = sparse_ops.sparse_reset_shape(sp_input, new_shape) 430 new_shape = np.array([3, 7], dtype=np.int64) 433 sparse_ops.sparse_reset_shape(sp_input, new_shape) [all …]
|
/external/tensorflow/tensorflow/python/ops/ |
D | special_math_ops.py | 1001 new_shape = ( 1004 t0 = _reshape_if_necessary(t0, new_shape) 1009 new_shape = ( 1012 t1 = _reshape_if_necessary(t1, new_shape) 1037 def _reshape_if_necessary(tensor, new_shape): argument 1040 new_shape = tuple(-1 if x is None else x for x in new_shape) 1042 if (len(new_shape) == len(cur_shape) and 1044 for d0, d1 in zip(cur_shape, new_shape))): 1047 return array_ops.reshape(tensor, new_shape)
|