/aosp_15_r20/external/pytorch/functorch/op_analysis/ |
H A D | annotated_ops | 39 as_strided, view/reshape 44 atleast_1d, view/reshape 45 atleast_2d, view/reshape 46 atleast_3d, view/reshape 62 broadcast_tensors, view/reshape 63 broadcast_to, view/reshape 64 cat, view/reshape 65 block_diag, view/reshape 68 unsafe_chunk, view/reshape 69 chunk, view/reshape [all …]
|
/aosp_15_r20/external/tensorflow/tensorflow/compiler/xla/service/ |
H A D | dynamic_update_slice_test.cc | 108 reshape.23 = s32[1]{0} reshape(slice.18) in XLA_TEST_F() 109 reshape.4 = s32[4]{0} reshape(dynamic-slice) in XLA_TEST_F() 110 slice.19 = s32[3]{0} slice(reshape.4), slice={[1:4]} in XLA_TEST_F() 112 concatenate.1 = s32[5]{0} concatenate(reshape.23, slice.19, constant.6), dimensions={0} in XLA_TEST_F() 120 reshape.24 = s32[] reshape(slice.18) in XLA_TEST_F() 121 slice.26 = s32[1]{0} slice(reshape.4), slice={[1:2]} in XLA_TEST_F() 122 reshape.10 = s32[] reshape(slice.26) in XLA_TEST_F() 123 slice.27 = s32[1]{0} slice(reshape.4), slice={[2:3]} in XLA_TEST_F() 124 reshape.11 = s32[] reshape(slice.27) in XLA_TEST_F() 125 slice.28 = s32[1]{0} slice(reshape.4), slice={[3:4]} in XLA_TEST_F() [all …]
|
H A D | reshape_mover_test.cc | 58 op::Add(op::Reshape(param0), op::Reshape(param1))); in TEST_F() 63 op::Add(op::Reshape(param0), op::Reshape(param1))); in TEST_F() 76 // Verifies that the reshape is not moved, since rng0 is trivially reshapable 101 op::Add(op::Reshape(rng0), const1)); 106 op::Add(op::Reshape(rng0), const1)); 127 op::Add(op::Reshape(param0), op::Reshape(param1))); in TEST_F() 133 op::Add(op::Reshape(op::Parameter()), op::Reshape(op::Parameter()))); in TEST_F() 154 op::Add(op::Reshape(param0), op::Reshape(param1))); in TEST_F() 158 op::Reshape(op::Add(param0, param1))); in TEST_F() 213 op::Reshape(op::Select(op::Reshape(const0), param1, param2))); [all …]
|
H A D | reshape_mover.cc | 21 // %reshape.A = NewShape reshape(%param.A) 22 // %reshape.B = NewShape reshape(%param.B) 23 // %instruction = NewShape instruction(%reshape.A, %reshape.B) 28 // %reshape = NewShape reshape(%instruction) 57 // NOTE: Technically a sequence of reshape(reshape(constant)) is also in CanTriviallyChangeShape() 61 // But it's not that simple. E.g. reshape(reshape(rng)) is only trivially in CanTriviallyChangeShape() 63 // reshape(scalar) isn't trivial at all if the reshape itself isn't scalar. in CanTriviallyChangeShape() 71 // A constant can trivially reshape the literal it holds. in CanTriviallyChangeShape() 93 // Returns true iff `instruction` is a reshape/transpose instruction for which 101 // Finds the first operand of an instruction that is a non-trivial reshape or [all …]
|
H A D | dynamic_padder.cc | 316 HloInstruction* reshape, int64_t input_dim, in GenerateBinaryMask() argument 321 split_input ? reshape->operand(0)->shape() : reshape->shape(); in GenerateBinaryMask() 323 split_input ? reshape->shape() : reshape->operand(0)->shape(); in GenerateBinaryMask() 328 HloInstruction* pred_true = reshape->AddInstruction( in GenerateBinaryMask() 330 HloInstruction* input_shape_pred_mask = reshape->AddInstruction( in GenerateBinaryMask() 335 reshape->AddInstruction(HloInstruction::CreateIota(mask_input_shape, 0)); in GenerateBinaryMask() 369 HloInstruction* static_output_dim_size = reshape->AddInstruction( in GenerateBinaryMask() 373 reshape->AddInstruction(HloInstruction::CreateBroadcast( in GenerateBinaryMask() 378 reshape->AddInstruction(HloInstruction::CreateBinary( in GenerateBinaryMask() 381 HloInstruction* broadcasted_effective_size = reshape->AddInstruction( in GenerateBinaryMask() [all …]
|
H A D | conditional_code_motion_test.cc | 50 %reshape.8493 = f32[2,512,364]{2,1,0} reshape(f32[93184,4]{1,0} %get-tuple-element.1) in TEST_F() 51 %convert.2894 = bf16[2,512,364]{2,1,0} convert(f32[2,512,364]{2,1,0} %reshape.8493) in TEST_F() 52 …ROOT %tuple.1 = ( bf16[2,512,364]{2,1,0}, f32[2,512,364]{2,1,0}) tuple(%convert.2894, %reshape.849… in TEST_F() 58 %reshape.9717 = f32[2,512,364]{2,1,0} reshape(f32[93184,4]{1,0} %get-tuple-element.3) in TEST_F() 59 …dd = f32[2,512,364]{2,1,0} add(f32[2,512,364]{2,1,0} %reshape.9717, f32[2,512,364]{2,1,0} %reshape… in TEST_F() 60 …%convert.3604 = bf16[2,512,364]{2,1,0} convert(f32[2,512,364]{2,1,0} %reshape.9717), metadata={op_… in TEST_F() 136 %reshape.8493 = f32[2,512,364]{2,1,0} reshape(f32[93184,4]{1,0} %get-tuple-element.1) in TEST_F() 137 …93 = f32[2,512,364]{2,1,0} add(f32[2,512,364]{2,1,0} %reshape.8493, f32[2,512,364]{2,1,0} %reshape… in TEST_F() 145 %reshape.9717 = f32[2,512,364]{2,1,0} reshape(f32[93184,4]{1,0} %get-tuple-element.3) in TEST_F() 146 …93 = f32[2,512,364]{2,1,0} add(f32[2,512,364]{2,1,0} %reshape.9717, f32[2,512,364]{2,1,0} %reshape… in TEST_F() [all …]
|
/aosp_15_r20/external/tensorflow/tensorflow/compiler/mlir/tensorflow/tests/ |
H A D | unroll-batch-matmul.mlir | 17 …// CHECK: %[[LHS_RESHAPED:.*]] = "tf.Reshape"(%arg0, %[[LHS_RESHAPED_SHAPE]]) : (tensor<2x3x4x5xf3… 19 …// CHECK: %[[LHS_1:.*]] = "tf.Reshape"(%[[LHS_SPLIT]]#0, %[[MATMUL_LHS_SHAPE]]) : (tensor<1x4x5xf3… 20 …// CHECK: %[[LHS_2:.*]] = "tf.Reshape"(%[[LHS_SPLIT]]#1, %[[MATMUL_LHS_SHAPE]]) : (tensor<1x4x5xf3… 21 …// CHECK: %[[LHS_3:.*]] = "tf.Reshape"(%[[LHS_SPLIT]]#2, %[[MATMUL_LHS_SHAPE]]) : (tensor<1x4x5xf3… 22 …// CHECK: %[[LHS_4:.*]] = "tf.Reshape"(%[[LHS_SPLIT]]#3, %[[MATMUL_LHS_SHAPE]]) : (tensor<1x4x5xf3… 23 …// CHECK: %[[LHS_5:.*]] = "tf.Reshape"(%[[LHS_SPLIT]]#4, %[[MATMUL_LHS_SHAPE]]) : (tensor<1x4x5xf3… 24 …// CHECK: %[[LHS_6:.*]] = "tf.Reshape"(%[[LHS_SPLIT]]#5, %[[MATMUL_LHS_SHAPE]]) : (tensor<1x4x5xf3… 26 …// CHECK: %[[RHS_RESHAPED:.*]] = "tf.Reshape"(%arg1, %[[RHS_RESHAPED_SHAPE]]) : (tensor<2x3x5x6xf3… 28 …// CHECK: %[[RHS_1:.*]] = "tf.Reshape"(%[[RHS_SPLIT]]#0, %[[MATMUL_RHS_SHAPE]]) : (tensor<1x5x6xf3… 29 …// CHECK: %[[RHS_2:.*]] = "tf.Reshape"(%[[RHS_SPLIT]]#1, %[[MATMUL_RHS_SHAPE]]) : (tensor<1x5x6xf3… [all …]
|
/aosp_15_r20/external/tensorflow/tensorflow/python/kernel_tests/array_ops/ |
H A D | reshape_op_test.py | 35 np_ans = x.reshape(y) 36 tf_ans = array_ops.reshape(x, y) 43 tf_ans = array_ops.reshape(x, y64) 50 y = array_ops.reshape(x, shape) 56 y = array_ops.reshape(x, shape64) 65 x = np.arange(1., 7.).reshape([1, 6]) > 3 69 x = np.arange(1., 7.).reshape([1, 6]).astype(np.float32) 73 x = np.arange(1., 7.).reshape([1, 6]).astype(np.float64) 77 x = np.arange(1., 7.).reshape([1, 6]).astype(np.int32) 81 x = np.arange(1., 7.).reshape([1, 6]).astype(np.complex64) [all …]
|
H A D | weights_broadcast_test.py | 29 return np.reshape(np.cumsum(np.ones(shape), dtype=np.int32), newshape=shape) 58 weights=np.asarray((5,)).reshape((1, 1, 1)), 64 weights=np.asarray((5, 7, 11, 3)).reshape((1, 1, 4)), 70 weights=np.asarray((5, 11)).reshape((1, 2, 1)), 76 weights=np.asarray((5, 7, 11, 3, 2, 13, 7, 5)).reshape((1, 2, 4)), 82 weights=np.asarray((5, 7, 11)).reshape((3, 1, 1)), 89 5, 7, 11, 3, 2, 12, 7, 5, 2, 17, 11, 3)).reshape((3, 1, 4)), 97 2, 17, 11, 3, 5, 7, 11, 3, 2, 12, 7, 5)).reshape((3, 2, 4)), 122 weights=np.asarray((5,)).reshape((1, 1)), 128 weights=np.asarray((5, 7, 11, 3, 2, 12)).reshape((3, 2)), [all …]
|
/aosp_15_r20/external/tensorflow/tensorflow/compiler/xla/service/gpu/tests/ |
H A D | gpu_reduce_scatter_creator_test.cc | 82 %reshape = s32[] reshape(%id) in TEST_F() 84 %offset = s32[] multiply(%reshape, %slice_size) in TEST_F() 120 %reshape = s32[] reshape(%id) in TEST_F() 122 %offset = s32[] multiply(%reshape, %slice_size) in TEST_F() 124 %reshape.1 = f32[32,16,64] reshape(%all-reduce) in TEST_F() 125 ROOT %dynamic-slice = f32[4,16,64] dynamic-slice(%reshape.1, %offset, %zero, %zero), in TEST_F() 135 op::Reshape(op::ReduceScatter(op::Parameter(0)))); in TEST_F() 157 %reshape.1 = f32[4,84,1024] reshape(%all-reduce) in TEST_F() 158 ROOT %dynamic-slice = f32[4,84,128] dynamic-slice(%reshape.1, %zero, %zero, %offset), in TEST_F() 168 op::Reshape(op::ReduceScatter(op::Parameter(0)))); in TEST_F() [all …]
|
/aosp_15_r20/external/tensorflow/tensorflow/compiler/mlir/xla/tests/translate/ |
H A D | fully_connected_reference_model.hlotxt | 14 // CHECK-NEXT: %[[VAL_2:.*]] = mhlo.reshape %[[VAL_0]] : (tensor<1x300xf32>) -> tensor<1x300xf32> 15 %reshape.3 = f32[1,300] reshape(%arg0.1) 18 %transpose.27 = f32[300,1] transpose(%reshape.3), dimensions={1,0} 20 …// CHECK-NEXT: %[[VAL_4:.*]] = mhlo.reshape %[[VAL_3]] : (tensor<300x1xf32>) -> tensor<300x1x1xf32> 21 %reshape.28 = f32[300,1,1] reshape(%transpose.27) 23 …// CHECK-NEXT: %[[VAL_5:.*]] = mhlo.reshape %[[VAL_4]] : (tensor<300x1x1xf32>) -> tensor<300x1xf32> 24 %reshape.29 = f32[300,1] reshape(%reshape.28) 27 %broadcast.30 = f32[300,1,5] broadcast(%reshape.29), dimensions={0,1} 62 …// CHECK-NEXT: %[[VAL_18:.*]] = mhlo.reshape %[[VAL_17]] : (tensor<1x300x3x1xf32>) -> tensor<1x300… 63 %reshape.4 = f32[1,300,3,1] reshape(%copy.1) [all …]
|
/aosp_15_r20/external/tensorflow/tensorflow/compiler/xla/tests/ |
H A D | concat_test.cc | 536 reshape.723 = f32[4,2,1]{2,1,0} reshape(parameter.38) in XLA_TEST_F() 537 reshape.724 = f32[4,2,1]{2,1,0} reshape(parameter.38) in XLA_TEST_F() 538 concatenate.42 = f32[4,2,2]{2,1,0} concatenate(reshape.723, reshape.724), dimensions={2} in XLA_TEST_F() 540 reshape.1058 = f32[4,2]{1,0} reshape(slice.351) in XLA_TEST_F() 541 slice.352 = f32[4,1]{1,0} slice(reshape.1058), slice={[0:4], [1:2]} in XLA_TEST_F() 542 reshape.1059 = f32[4]{0} reshape(slice.352) in XLA_TEST_F() 544 reshape.1060 = f32[4]{0} reshape(slice.353) in XLA_TEST_F() 545 add.124 = f32[4]{0} add(reshape.1059, reshape.1060) in XLA_TEST_F() 546 slice.354 = f32[4,1]{1,0} slice(reshape.1058), slice={[0:4], [0:1]} in XLA_TEST_F() 547 reshape.1061 = f32[4]{0} reshape(slice.354) in XLA_TEST_F() [all …]
|
H A D | ptxas_bug_120501638.cc | 41 reshape.2 = f32[2,5,2]{2,1,0} reshape(arg0.1) in TEST_F() 43 pad.4 = f32[2,6,2]{2,1,0} pad(reshape.2, constant.3), padding=0_0x0_1x0_0 in TEST_F() 44 reshape.5 = f32[2,3,2,2]{3,2,1,0} reshape(pad.4) in TEST_F() 45 transpose.6 = f32[2,2,3,2]{3,0,2,1} transpose(reshape.5), dimensions={2,0,1,3} in TEST_F() 46 reshape.7 = f32[4,3,2]{2,1,0} reshape(transpose.6) in TEST_F() 47 reshape.8 = f32[4,1,3,2]{3,2,1,0} reshape(reshape.7) in TEST_F() 48 transpose.9 = f32[4,2,1,3]{1,3,2,0} transpose(reshape.8), dimensions={0,3,1,2} in TEST_F() 60 reshape.24 = f32[4,3,2]{2,1,0} reshape(transpose.23) in TEST_F() 61 reshape.25 = f32[2,2,3,2]{3,2,1,0} reshape(reshape.24) in TEST_F() 62 transpose.26 = f32[2,3,2,2]{3,1,0,2} transpose(reshape.25), dimensions={1,2,0,3} in TEST_F() [all …]
|
H A D | reshape_test.cc | 107 auto reshape = Reshape(/*operand=*/parameter, /*dimensions=*/{0, 1}, in XLA_TEST_P() local 109 auto new_shape = builder.GetShape(reshape).value(); in XLA_TEST_P() 125 Reshape(/*operand=*/a, /*dimensions=*/{}, /*new_sizes=*/{1}); in XLA_TEST_P() 211 Reshape(/*operand=*/parameter, /*dimensions=*/{0}, in XLA_TEST_P() 227 Reshape(/*operand=*/parameter, /*dimensions=*/{0}, in XLA_TEST_P() 243 Reshape(/*operand=*/parameter, /*dimensions=*/{0, 1}, in XLA_TEST_P() 259 Reshape(/*operand=*/parameter, /*dimensions=*/{0, 1}, in XLA_TEST_P() 277 Reshape(/*operand=*/parameter, /*dimensions=*/{1, 0}, in XLA_TEST_P() 326 Reshape(/*operand=*/parameter, /*dimensions=*/{0, 1}, in XLA_TEST_P() 341 Reshape(/*operand=*/parameter, /*dimensions=*/{0, 1, 2, 3}, in XLA_TEST_P() [all …]
|
/aosp_15_r20/external/tensorflow/tensorflow/python/training/ |
H A D | checkpoint_ops_test.py | 45 np.reshape(np.linspace(0.0, 79, 5 * 16), (5, 16))) 109 np.reshape([18, 34, 50, self.init_val, self.init_val], [5, 1]), 110 np.reshape([16, 32, 48, self.init_val, self.init_val], [5, 1]), 111 np.reshape([self.init_val] * 5, [5, 1]), 112 np.reshape([17, 33, 49, self.init_val, self.init_val], [5, 1]), 113 np.reshape([self.init_val] * 5, [5, 1]) 141 np.reshape([2, 18, 34, 50, self.init_val, self.init_val], [6, 1]), 142 np.reshape([0, 16, 32, 48, self.init_val, self.init_val], [6, 1]), 143 np.reshape([self.init_val] * 6, [6, 1]), 144 np.reshape([1, 17, 33, 49, self.init_val, self.init_val], [6, 1]), [all …]
|
/aosp_15_r20/external/tensorflow/tensorflow/core/kernels/ |
H A D | training_ops_gpu.cu.cc | 269 var.device(d) -= lr.reshape(single).broadcast(bcast) * grad; in operator ()() 401 var.device(d) -= lr.reshape(single).broadcast(bcast) * grad * accum.rsqrt(); in operator ()() 424 grad / (accum.sqrt() + epsilon.reshape(single).broadcast(bcast)); in operator ()() 425 var.device(d) -= lr.reshape(single).broadcast(bcast) * update; in operator ()() 474 auto lr_bcast = lr.reshape(single).broadcast(bcast); in operator ()() 475 auto l1_bcast = l1.reshape(single).broadcast(bcast); in operator ()() 476 auto l2_bcast = l2.reshape(single).broadcast(bcast); in operator ()() 532 accum.device(d) = accum * rho.reshape(single).broadcast(bcast) + in operator ()() 534 rho.reshape(single).broadcast(bcast)); in operator ()() 536 (accum_update + epsilon.reshape(single).broadcast(bcast)).sqrt() * in operator ()() [all …]
|
H A D | batch_norm_op.h | 46 output.reshape(rest_by_depth).device(d) = in operator() 47 (input.reshape(rest_by_depth) - in operator() 48 mean.reshape(one_by_depth).broadcast(rest_by_one)) * in operator() 51 .reshape(one_by_depth) in operator() 53 beta.reshape(one_by_depth).broadcast(rest_by_one); in operator() 55 output.reshape(rest_by_depth).device(d) = in operator() 56 (input.reshape(rest_by_depth) - in operator() 57 mean.reshape(one_by_depth).broadcast(rest_by_one)) * in operator() 60 .reshape(one_by_depth) in operator() 62 beta.reshape(one_by_depth).broadcast(rest_by_one); in operator() [all …]
|
/aosp_15_r20/external/tensorflow/tensorflow/compiler/xla/service/spmd/ |
H A D | canonicalize_all_gather_for_cse_test.cc | 59 resh = s32[1,8]{1,0} reshape(param0) in TEST_F() 66 const HloInstruction* const reshape = in TEST_F() local 68 EXPECT_THAT(reshape, in TEST_F() 69 AllOf(op::Reshape(op::AllGather(_)), op::Shape("s32[2,8]"))); in TEST_F() 78 resh = s32[1,8]{1,0} reshape(param0) in TEST_F() 79 resh2 = s32[1,8,1,1]{3,2,1,0} reshape(resh) in TEST_F() 86 const HloInstruction* const reshape = in TEST_F() local 88 EXPECT_THAT(reshape, op::Reshape(op::AllGather(op::Parameter()))); in TEST_F() 97 resh = s32[8,1,1]{2,1,0} reshape(param0) in TEST_F() 98 resh2 = s32[1,8,1,1]{3,2,1,0} reshape(resh) in TEST_F() [all …]
|
H A D | spmd_partitioner_test.cc | 63 // might create reshape/transposes around it. in PartitionComputation() 181 op::Reshape(op::DynamicSlice(op::Constant(), op::PartitionId())), in TEST_F() 203 op::Reshape(op::DynamicSlice(op::Constant(), op::PartitionId())), in TEST_F() 225 op::Reshape(op::DynamicSlice(op::Constant(), op::PartitionId())), in TEST_F() 245 AllOf(op::Copy(op::Reshape(op::Transpose(op::AllToAll(AllOf( in TEST_F() 246 op::Reshape(op::Parameter()), op::Shape("s32[4,2,1]")))))), in TEST_F() 265 AllOf(op::Copy(op::Slice(op::Reshape(AllOf(op::Transpose(op::AllToAll( in TEST_F() 266 op::Reshape(AllOf(op::Pad(), op::Shape("f32[8,16,128]"))))))))))); in TEST_F() 320 op::Reshape(op::DynamicSlice(op::Constant(), op::PartitionId())); in TEST_F() 350 op::Reshape(op::DynamicSlice(op::Constant(), op::PartitionId())), in TEST_F() [all …]
|
/aosp_15_r20/external/tensorflow/tensorflow/python/kernel_tests/math_ops/ |
H A D | transpose_op_test.py | 142 vector = np.arange(0, 2).reshape((1, 1, 1, 2, 1)) 164 1, total_size + 1, dtype=datatype).reshape(input_shape) 187 1, total_size + 1, dtype=np.float32).reshape(input_shape) 224 1, total_size + 1, dtype=np.float32).reshape(input_shape) 249 1, total_size + 1, dtype=datatype).reshape(input_shape) 272 1, total_size + 1, dtype=np.float32).reshape(input_shape) 336 self._compareCpu(np.arange(0, 6).reshape([3, 2]).astype(np.float32), [0, 1]) 340 np.arange(0, 8).reshape([2, 4]).astype(np.float32), 346 x = np.arange(0, 8).reshape([2, 4]).astype(np.float32) 358 self._compare(np.arange(0, 21).reshape([3, 7]).astype(np.float16)) [all …]
|
/aosp_15_r20/external/tensorflow/tensorflow/compiler/xla/service/gpu/ |
H A D | cudnn_vectorize_convolutions_test.cc | 73 m::Reshape(m::GetTupleElement( in TEST_F() 75 m::Reshape(m::Parameter(0)) in TEST_F() 77 m::Reshape(m::Parameter(1)) in TEST_F() 148 m::Reshape(m::GetTupleElement( in TEST_F() 150 m::Reshape(m::Parameter(0)) in TEST_F() 152 m::Reshape(m::Parameter(1)) in TEST_F() 201 m::Reshape(m::GetTupleElement( in TEST_F() 203 m::Reshape(m::Parameter(0)) in TEST_F() 205 m::Reshape(m::Parameter(1)) in TEST_F() 254 m::Reshape(m::GetTupleElement( in TEST_F() [all …]
|
/aosp_15_r20/external/tensorflow/tensorflow/compiler/xla/mlir_hlo/tests/Dialect/mhlo/canonicalize/ |
H A D | reshape.mlir | 7 %0 = "mhlo.reshape"(%cst) : (tensor<1x1xi32>) -> tensor<i32> 18 %0 = "mhlo.reshape"(%cst) : (tensor<1x2xi32>) -> tensor<2xi32> 29 %0 = "mhlo.reshape"(%cst) : (tensor<i32>) -> tensor<1xi32> 40 %0 = "mhlo.reshape"(%cst) : (tensor<4x4xi64>) -> tensor<16xi64> 51 %0 = "mhlo.reshape"(%cst) : (tensor<4x4xi64>) -> tensor<16xi64> 62 %0 = "mhlo.reshape"(%cst) : (tensor<3x2xi32>) -> tensor<6xi32> 75 %0 = "mhlo.reshape"(%cst) : (tensor<6xi32>) -> tensor<2x3xi32> 86 %0 = "mhlo.reshape"(%cst) : (tensor<4x4xf64>) -> tensor<16xf64> 97 %0 = "mhlo.reshape"(%arg) : (tensor<2x3xi32>) -> tensor<2x3xi32> 106 // CHECK-NEXT: mhlo.reshape [[ARG]] : (tensor<2x3xi32>) -> tensor<3x2xi32> [all …]
|
/aosp_15_r20/cts/apps/CameraITS/utils/ |
H A D | image_processing_utils.py | 228 return numpy.array(lsc_map).reshape(lsc_map_h, lsc_map_w, _NUM_RAW_CHANNELS) 353 cap['data'] = unpack_raw10_image(cap['data'].reshape(h, w * 5 // 4)) 378 msbs = msbs.reshape(h, w) 380 lsbs = img[::, 4::5].reshape(h, w // 4) 382 numpy.packbits(numpy.unpackbits(lsbs).reshape((h, w // 4, 4, 2)), 3), 6) 384 lsbs = lsbs.reshape(h, w // 4, 4)[:, :, ::-1] 385 lsbs = lsbs.reshape(h, w) 387 img16 = numpy.bitwise_or(msbs, lsbs).reshape(h, w) 406 cap['data'] = unpack_raw12_image(cap['data'].reshape(h, w * 3 // 2)) 431 msbs = msbs.reshape(h, w) [all …]
|
/aosp_15_r20/external/tensorflow/tensorflow/python/compiler/tensorrt/test/ |
H A D | reshape_transpose_test.py | 32 # reshape with scalar input will be filtered out of the segment before 38 incompatible_reshape = array_ops.reshape(inp, shape) 39 reshape_back = array_ops.reshape(incompatible_reshape, orig_shape) 43 compatible_reshape = array_ops.reshape( 44 inp, [-1, 24 * 24, 2], name="reshape-0") 45 compatible_reshape = array_ops.reshape( 46 compatible_reshape, [100, 24, -1], name="reshape-1") 47 compatible_reshape = array_ops.reshape( 48 compatible_reshape, [100, 24 * 2, 24], name="reshape-2") 49 compatible_reshape = array_ops.reshape( [all …]
|
/aosp_15_r20/external/tensorflow/tensorflow/compiler/mlir/lite/tests/ |
H A D | canonicalize.mlir | 21 // Checks that tfl.reshape shape operand is converted to a vector if it is possible 25 // expected-error @+1 {{'tfl.reshape' op requires 'shape' to be rank 1, but got 2}} 26 %1 = "tfl.reshape"(%arg0, %shape0) : (tensor<4x4x4xf32>, tensor<1x2xi32>) -> tensor<16x4xf32> 32 // Checks that tfl.reshape should be removed if its output's only user is 33 // another tfl.reshape 38 %0 = "tfl.reshape"(%arg0, %shape0) : (tensor<4x4x4xf32>, tensor<2xi32>) -> tensor<16x4xf32> 39 %1 = "tfl.reshape"(%0, %shape1) : (tensor<16x4xf32>, tensor<1xi32>) -> tensor<64xf32> 44 // CHECK: %[[RESHAPE:.*]] = "tfl.reshape"(%arg0, %[[CST]]) : (tensor<4x4x4xf32>, tensor<1xi32>) ->… 45 // CHECK: return %[[RESHAPE]] 48 // Checks that tfl.reshape should be removed if its output has more than one [all …]
|