/external/tensorflow/tensorflow/lite/delegates/gpu/common/ |
D | flops_util.cc | 21 uint64_t GetConvolutionFlops(const BHWC& dst_shape, const OHWI& weights_shape) { in GetConvolutionFlops() argument 22 uint64_t dst_elements = dst_shape.b * dst_shape.h * dst_shape.w * dst_shape.c; in GetConvolutionFlops() 27 uint64_t GetConvolutionWinograd4x4To6x6Flops(const BHWC& dst_shape, in GetConvolutionWinograd4x4To6x6Flops() argument 29 return GetConvolutionFlops(dst_shape, weights_shape) / 4u; in GetConvolutionWinograd4x4To6x6Flops() 39 uint64_t GetDepthwiseConvolutionFlops(const BHWC& dst_shape, in GetDepthwiseConvolutionFlops() argument 41 uint64_t dst_elements = dst_shape.b * dst_shape.h * dst_shape.w * dst_shape.c; in GetDepthwiseConvolutionFlops() 46 uint64_t GetFullyConnectedFlops(const BHWC& dst_shape, in GetFullyConnectedFlops() argument 48 uint64_t dst_elements = dst_shape.b * dst_shape.h * dst_shape.w * dst_shape.c; in GetFullyConnectedFlops()
|
D | winograd_util.cc | 114 OHWI dst_shape; in RearrangeWeightsToWinograd4x4To6x6Weights() local 115 dst_shape.o = src_weights.shape.o; in RearrangeWeightsToWinograd4x4To6x6Weights() 116 dst_shape.h = 6; in RearrangeWeightsToWinograd4x4To6x6Weights() 117 dst_shape.w = 6; in RearrangeWeightsToWinograd4x4To6x6Weights() 118 dst_shape.i = src_weights.shape.i; in RearrangeWeightsToWinograd4x4To6x6Weights() 119 dst_weights->shape = dst_shape; in RearrangeWeightsToWinograd4x4To6x6Weights() 120 dst_weights->data.resize(dst_shape.DimensionsProduct()); in RearrangeWeightsToWinograd4x4To6x6Weights() 144 const int f_index = dst_shape.LinearIndex({d, y, x, s}); in RearrangeWeightsToWinograd4x4To6x6Weights()
|
D | flops_util.h | 26 uint64_t GetConvolutionFlops(const BHWC& dst_shape, const OHWI& weights_shape); 27 uint64_t GetConvolutionWinograd4x4To6x6Flops(const BHWC& dst_shape, 33 uint64_t GetDepthwiseConvolutionFlops(const BHWC& dst_shape, 36 uint64_t GetFullyConnectedFlops(const BHWC& dst_shape,
|
/external/tensorflow/tensorflow/lite/delegates/gpu/common/selectors/default/ |
D | convolution_selector.cc | 36 const Convolution2DAttributes& attr, const BHWC& dst_shape, in SelectConvolutionAdreno() argument 43 ConvGeneric conv = CreateConvGeneric(gpu_info, op_def, attr, &dst_shape); in SelectConvolutionAdreno() 49 const Convolution2DAttributes& attr, const BHWC& dst_shape, in SelectConvolutionNVidia() argument 55 ConvGeneric conv = CreateConvGeneric(gpu_info, op_def, attr, &dst_shape); in SelectConvolutionNVidia() 61 const Convolution2DAttributes& attr, const BHWC& dst_shape, in SelectConvolutionApple() argument 66 IsGoodTaskSizeForAppleConvSimd(dst_shape, gpu_info)) { in SelectConvolutionApple() 68 CreateConvolutionMetalSimd(op_def, dst_shape, attr, gpu_info); in SelectConvolutionApple() 71 ConvGeneric conv = CreateConvGeneric(gpu_info, op_def, attr, &dst_shape); in SelectConvolutionApple() 79 const Convolution2DAttributes& attr, const BHWC& dst_shape, in SelectConvolution() argument 83 return SelectConvolutionApple(attr, dst_shape, gpu_info, op_def); in SelectConvolution() [all …]
|
/external/ComputeLibrary/src/runtime/heuristics/direct_conv/ |
D | ClDirectConvDefaultConfigValhall.cpp | 81 …const TensorShape dst_shape = misc::shape_calculator::compute_deep_convolution_sh… in configure_G78_f32() local 84 const int32_t ofm = dst_shape[0]; in configure_G78_f32() 85 const int32_t m = dst_shape[1] * dst_shape[2]; in configure_G78_f32() 90 if(dst_shape[0] <= 4) in configure_G78_f32() 142 …const TensorShape dst_shape = misc::shape_calculator::compute_deep_convolution_sh… in configure_G78_f16() local 145 const int32_t ofm = dst_shape[0]; in configure_G78_f16() 146 const int32_t m = dst_shape[1] * dst_shape[2]; in configure_G78_f16() 152 if(dst_shape[0] <= 4) in configure_G78_f16() 185 desc.n0 = dst_shape[0]; in configure_G78_f16() 278 …const TensorShape dst_shape = misc::shape_calculator::compute_deep_convolution_sh… in configure_G57_f32() local [all …]
|
/external/ComputeLibrary/tests/validation/reference/ |
D | BatchToSpaceLayer.cpp | 38 …const SimpleTensor<T> &src, const SimpleTensor<int32_t> &block_shape, const TensorShape &dst_shape) in batch_to_space() argument 42 SimpleTensor<T> result(dst_shape, src.data_type()); in batch_to_space() 61 …nt out_pos = out_x + dst_shape[0] * out_y + z * dst_shape[0] * dst_shape[1] + (batch % r) * dst_sh… in batch_to_space() 71 … SimpleTensor<float> &src, const SimpleTensor<int32_t> &block_shape, const TensorShape &dst_shape); 72 …t SimpleTensor<half> &src, const SimpleTensor<int32_t> &block_shape, const TensorShape &dst_shape);
|
D | DepthToSpaceLayer.cpp | 38 SimpleTensor<T> depth_to_space(const SimpleTensor<T> &src, const TensorShape &dst_shape, int32_t bl… in depth_to_space() argument 41 SimpleTensor<T> result(dst_shape, src.data_type()); in depth_to_space() 61 … int out_pos = out_x + dst_shape[0] * out_y + (z % r) * dst_shape[0] * dst_shape[1] + b * dst_shap… in depth_to_space() 71 …loat> depth_to_space(const SimpleTensor<float> &src, const TensorShape &dst_shape, int32_t block_s… 72 …<half> depth_to_space(const SimpleTensor<half> &src, const TensorShape &dst_shape, int32_t block_s…
|
D | Col2Im.cpp | 38 SimpleTensor<T> col2im(const SimpleTensor<T> &src, const TensorShape &dst_shape, unsigned int num_g… in col2im() argument 40 SimpleTensor<T> dst{ dst_shape, src.data_type(), 1 }; in col2im() 43 …const size_t batches = dst_shape.total_size() / (dst_shape.x() * dst_shape.y() * dst_shape.z()); in col2im() 88 template SimpleTensor<float> col2im(const SimpleTensor<float> &src, const TensorShape &dst_shape, u… 89 template SimpleTensor<half> col2im(const SimpleTensor<half> &src, const TensorShape &dst_shape, uns… 90 …or<uint8_t> col2im(const SimpleTensor<uint8_t> &src, const TensorShape &dst_shape, unsigned int nu…
|
D | DepthwiseConvolutionLayer.cpp | 54 …leTensor<T> &weights, const SimpleTensor<T> &biases, const TensorShape &dst_shape, const PadStride… in depthwise_convolution_fp() argument 59 SimpleTensor<T> dst{ dst_shape, src.data_type(), 1 }; in depthwise_convolution_fp() 84 const int maximum_x = (conv_info.stride().first * (dst_shape[0] - 1)); in depthwise_convolution_fp() 85 const int maximum_y = (conv_info.stride().second * (dst_shape[1] - 1)); in depthwise_convolution_fp() 138 …const SimpleTensor<TW> &weights, const SimpleTensor<int32_t> &biases, const TensorShape &dst_shape, in depthwise_convolution_quantized() argument 143 SimpleTensor<T> dst{ dst_shape, src.data_type(), 1, dst_qinfo }; in depthwise_convolution_quantized() 177 const int maximum_x = (conv_info.stride().first * (dst_shape[0] - 1)); in depthwise_convolution_quantized() 178 const int maximum_y = (conv_info.stride().second * (dst_shape[1] - 1)); in depthwise_convolution_quantized() 238 …onst SimpleTensor<float> &weights, const SimpleTensor<float> &biases, const TensorShape &dst_shape, in depthwise_convolution() argument 241 …return depthwise_convolution_fp(src, weights, biases, dst_shape, conv_info, depth_multiplier, dila… in depthwise_convolution() [all …]
|
D | ReductionOperation.cpp | 184 …pute_reduction_operation(const SimpleTensor<T> &src, const TensorShape &dst_shape, unsigned int ax… in compute_reduction_operation() argument 189 SimpleTensor<OT> dst{ dst_shape, output_data_type, 1, src.quantization_info() }; in compute_reduction_operation() 278 SimpleTensor<OT> reduction_operation(const SimpleTensor<T> &src, const TensorShape &dst_shape, unsi… in reduction_operation() argument 281 return compute_reduction_operation<T, OT>(src, dst_shape, axis, op, policy); in reduction_operation() 285 …eduction_operation(const SimpleTensor<uint8_t> &src, const TensorShape &dst_shape, unsigned int ax… in reduction_operation() argument 292 return compute_reduction_operation<uint8_t, uint8_t>(src, dst_shape, axis, op, policy); in reduction_operation() 297 …mpleTensor<float> dst_f = reference::reduction_operation<float, float>(src_f, dst_shape, axis, op); in reduction_operation() 303 return compute_reduction_operation<uint8_t, uint8_t>(src, dst_shape, axis, op, policy); in reduction_operation() 308 …reduction_operation(const SimpleTensor<int8_t> &src, const TensorShape &dst_shape, unsigned int ax… in reduction_operation() argument 315 return compute_reduction_operation<int8_t, int8_t>(src, dst_shape, axis, op, policy); in reduction_operation() [all …]
|
D | SpaceToDepth.cpp | 38 SimpleTensor<T> space_to_depth(const SimpleTensor<T> &src, const TensorShape &dst_shape, const int … in space_to_depth() argument 40 SimpleTensor<T> result(dst_shape, src.data_type()); in space_to_depth() 42 const auto width_out = static_cast<int>(dst_shape[0]); in space_to_depth() 43 const auto height_out = static_cast<int>(dst_shape[1]); in space_to_depth() 44 const auto channel_out = static_cast<int>(dst_shape[2]); in space_to_depth() 79 …loat> space_to_depth(const SimpleTensor<float> &src, const TensorShape &dst_shape, const int block… 80 …<half> space_to_depth(const SimpleTensor<half> &src, const TensorShape &dst_shape, const int block…
|
D | SpaceToBatch.cpp | 38 …eTensor<int32_t> &block_shape, const SimpleTensor<int32_t> &paddings, const TensorShape &dst_shape) in space_to_batch() argument 40 SimpleTensor<T> result(dst_shape, src.data_type(), 1, src.quantization_info()); in space_to_batch() 42 const auto width_out = static_cast<int>(dst_shape[0]); in space_to_batch() 43 const auto height_out = static_cast<int>(dst_shape[1]); in space_to_batch() 44 const auto batch_out = static_cast<int>(dst_shape[3]); in space_to_batch() 94 …Tensor<int32_t> &block_shape, const SimpleTensor<int32_t> &paddings, const TensorShape &dst_shape); 95 …Tensor<int32_t> &block_shape, const SimpleTensor<int32_t> &paddings, const TensorShape &dst_shape); 96 …Tensor<int32_t> &block_shape, const SimpleTensor<int32_t> &paddings, const TensorShape &dst_shape);
|
D | WeightsReshape.cpp | 38 …SimpleTensor<T> &src, const SimpleTensor<T> &biases, const TensorShape &dst_shape, const unsigned … in weights_reshape() argument 40 SimpleTensor<T> dst{ dst_shape, src.data_type(), 1 }; in weights_reshape() 68 …nsor<float> &src, const SimpleTensor<float> &biases, const TensorShape &dst_shape, const unsigned … 69 …Tensor<half> &src, const SimpleTensor<half> &biases, const TensorShape &dst_shape, const unsigned … 70 …<uint8_t> &src, const SimpleTensor<uint8_t> &biases, const TensorShape &dst_shape, const unsigned …
|
D | FullyConnectedLayer.cpp | 115 …pleTensor<T> &weights, const SimpleTensor<TB> &bias, const TensorShape &dst_shape, QuantizationInf… in fully_connected_layer() argument 124 SimpleTensor<T> dst{ TensorShape{ dst_shape }, src.data_type(), 1, out_quant_info }; in fully_connected_layer() 127 …const int num_batch_dimensions = std::max(0, static_cast<int>(dst_shape.num_dimensions())… in fully_connected_layer() 141 const int num_batches = dst_shape.total_size_upper(1); in fully_connected_layer() 161 … const SimpleTensor<float> &weights, const SimpleTensor<float> &bias, const TensorShape &dst_shape, 163 …c, const SimpleTensor<half> &weights, const SimpleTensor<half> &bias, const TensorShape &dst_shape, 165 …st SimpleTensor<uint8_t> &weights, const SimpleTensor<int32_t> &bias, const TensorShape &dst_shape, 167 …nst SimpleTensor<int8_t> &weights, const SimpleTensor<int32_t> &bias, const TensorShape &dst_shape,
|
/external/tensorflow/tensorflow/lite/delegates/gpu/common/tasks/ |
D | conv_generic.cc | 175 const GpuInfo& gpu_info, const BHWC* dst_shape) in ConvGeneric() argument 181 conv_params_(GuessBestParams(gpu_info, definition, attr, dst_shape)) { in ConvGeneric() 202 const BHWC* dst_shape) in ConvGeneric() argument 209 dst_shape)) {} in ConvGeneric() 213 const GpuInfo& gpu_info, const BHWC* dst_shape) in ConvGeneric() argument 219 conv_params_(GuessBestParams(gpu_info, definition, attr, dst_shape)) {} in ConvGeneric() 238 const GpuInfo& gpu_info, const BHWDC* dst_shape) in ConvGeneric() argument 246 conv_params_(GuessBestParams(gpu_info, definition, attr, dst_shape)) {} in ConvGeneric() 1136 int GetGroupsCount(const BHWC& dst_shape, const int3& wg_size, in GetGroupsCount() argument 1138 const int dst_slices = DivideRoundUp(dst_shape.c, 4); in GetGroupsCount() [all …]
|
D | conv_generic.h | 111 const BHWC* dst_shape = nullptr); 114 const GpuInfo& gpu_info, const BHWC* dst_shape = nullptr); 117 const BHWC* dst_shape = nullptr); 121 const BHWDC* dst_shape = nullptr); 144 const BHWC* dst_shape); 149 const BHWC* dst_shape); 153 const OHWI& weights_shape, const BHWC* dst_shape); 158 const BHWC* dst_shape); 162 const Convolution2DAttributes& attr, const BHWC* dst_shape); 167 const BHWDC* dst_shape); [all …]
|
D | conv_metal_simd.cc | 419 int Get2dGroupsCount(const BHWC& dst_shape, const int2 group_size) { in Get2dGroupsCount() argument 420 int x_groups = DivideRoundUp(dst_shape.w * dst_shape.b, group_size.x); in Get2dGroupsCount() 421 int y_groups = DivideRoundUp(dst_shape.h, group_size.y); in Get2dGroupsCount() 425 int2 GetOptimalGroupSize(const BHWC& dst_shape) { in GetOptimalGroupSize() argument 427 int min_2d_work_groups = Get2dGroupsCount(dst_shape, base_work_groups[0]); in GetOptimalGroupSize() 430 int groups_count = Get2dGroupsCount(dst_shape, base_work_groups[i]); in GetOptimalGroupSize() 455 const OperationDef& definition, const BHWC& dst_shape, in CreateConvolutionMetalSimd() argument 458 const int2 optimal_2d_group_size = GetOptimalGroupSize(dst_shape); in CreateConvolutionMetalSimd() 459 const int groups2d_count = Get2dGroupsCount(dst_shape, optimal_2d_group_size); in CreateConvolutionMetalSimd() 461 DivideRoundUp(dst_shape.w * dst_shape.b * dst_shape.h, 32); in CreateConvolutionMetalSimd() [all …]
|
/external/ComputeLibrary/src/dynamic_fusion/sketch/gpu/components/cl/ |
D | ClComponentElementwiseBinary.cpp | 68 const auto &dst_shape = dst->tensor_shape(); in validate() local 71 …il::have_different_dimensions(lhs_shape, dst_shape, 0) && detail::have_different_dimensions(rhs_sh… in validate() 78 …(lhs_shape[1] != dst_shape[1] || rhs_shape[1] != dst_shape[1]) != (lhs_shape[2] != dst_shape[2] ||… in validate() 82 detail::have_different_dimensions(lhs_shape, dst_shape, 3), in validate() 86 detail::have_different_dimensions(rhs_shape, dst_shape, 3), in validate()
|
/external/tensorflow/tensorflow/python/ops/ragged/ |
D | ragged_tensor_shape.py | 515 def _broadcast_to_ragged_shape(rt_input, dst_shape, broadcast_inner_dimensions): argument 519 rt_input.row_splits.dtype != dst_shape.dim_size_dtype): 526 dst_shape = dst_shape.with_dim_size_dtype(dtypes.int64) 529 if rt_input.shape.ndims is None or dst_shape.rank is None: 531 if rt_input.shape.ndims > dst_shape.rank: 534 rt_input.ragged_rank >= dst_shape.num_partitioned_dimensions): 538 src_shape = src_shape.broadcast_to_rank(dst_shape.rank) 541 if dst_shape.rank > rt_input.shape.ndims: 542 if rt_input.shape.ndims < dst_shape.num_inner_dimensions + 1: 544 rt_input, array_ops.concat([[-1], dst_shape.inner_dim_sizes], axis=0)) [all …]
|
/external/ComputeLibrary/src/runtime/heuristics/indirect_conv/ |
D | ClIndirectConvDefaultConfigValhall.cpp | 66 …const TensorShape dst_shape = misc::shape_calculator::compute_deep_convolution_sh… in configure_G77_f32() local 70 const int32_t ofm = dst_shape[0]; in configure_G77_f32() 71 const int32_t m = (dst_shape[1]/ stride_x) * (dst_shape[2] / stride_y); in configure_G77_f32() 110 …const TensorShape dst_shape = misc::shape_calculator::compute_deep_convolution_sh… in configure_G77_f16() local 113 const int32_t ofm = dst_shape[0]; in configure_G77_f16() 114 const int32_t m = dst_shape[1] * dst_shape[2]; in configure_G77_f16()
|
/external/ComputeLibrary/src/core/ |
D | Helpers.cpp | 28 ValidRegion calculate_valid_region_scale(const ITensorInfo &src_info, const TensorShape &dst_shape, in calculate_valid_region_scale() argument 35 …const float scale_x = static_cast<float>(dst_shape[idx_width]) / src_info.tensor_shape()[id… in calculate_valid_region_scale() 36 …const float scale_y = static_cast<float>(dst_shape[idx_height]) / src_info.tensor_shape()[i… in calculate_valid_region_scale() 48 … auto valid_end_out_x = std::min<int>(std::ceil(valid_end_in_x * scale_x), dst_shape[idx_width]); in calculate_valid_region_scale() 49 …auto valid_end_out_y = std::min<int>(std::ceil(valid_end_in_y * scale_y), dst_shape[idx_height]); in calculate_valid_region_scale() 93 ValidRegion valid_region{ Coordinates(), dst_shape, dst_shape.num_dimensions() }; in calculate_valid_region_scale() 98 ….shape.set(idx_width, std::min<size_t>(valid_end_out_x - valid_start_out_x, dst_shape[idx_width])); in calculate_valid_region_scale() 99 …hape.set(idx_height, std::min<size_t>(valid_end_out_y - valid_start_out_y, dst_shape[idx_height])); in calculate_valid_region_scale()
|
/external/tensorflow/tensorflow/lite/delegates/gpu/metal/kernels/ |
D | conv_test.mm | 69 auto dst_shape = CalculateOutputShape(src_shape, attr); 73 conv_shape.b = dst_shape.b; 76 conv_shape.c = dst_shape.c; 95 auto gpu_op0 = CreateConvGeneric(env->GetGpuInfo(), op_def, attr, &dst_shape); 98 env->ExecuteGPUOperation(src_tensor, std::move(op0_ptr), dst_shape, &output0)); 121 BHWC output3_shape = dst_shape; 159 auto dst_shape = BHWC(1, 1, 1, 8); 160 ConvGeneric operation = CreateConvGeneric(env->GetGpuInfo(), op_def, attr, &dst_shape); 162 src_tensor, std::make_unique<ConvGeneric>(std::move(operation)), dst_shape, &dst_tensor)); 174 const BHWC dst_shape(1, 32, 32, 1024); [all …]
|
/external/ComputeLibrary/src/gpu/cl/kernels/ |
D | ClPermuteKernel.cpp | 50 TensorShape dst_shape = src->tensor_shape(); in get_dst_shape() local 51 permute(dst_shape, perm); in get_dst_shape() 52 return dst_shape; in get_dst_shape() 71 …const TensorShape dst_shape = misc::shape_calculator::compute_permutation_output_shape(*src, perm); in validate_arguments() local 72 ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DIMENSIONS(dst->tensor_shape(), dst_shape); in validate_arguments() 89 const TensorShape dst_shape = get_dst_shape(src, perm); in configure() local 91 auto_init_if_empty(*dst, src->clone()->set_tensor_shape(dst_shape)); in configure()
|
/external/tensorflow/tensorflow/compiler/xla/service/ |
D | bitcast_decomposer.cc | 90 const Shape& dst_shape = instr->shape(); in Run() local 146 if (Rank(operand) == Rank(dst_shape)) { in Run() 191 ComposePermutations(ReverseIota(Rank(dst_shape)), in Run() 192 InversePermutation(LayoutPerm(dst_shape))); in Run() 199 elem_ty, ComposePermutations(dst_shape.dimensions(), in Run() 206 if (!ShapeUtil::Equal(operand->shape(), dst_shape)) { in Run() 207 operand = create_tib(dst_shape, operand, transpose_perm); in Run()
|
/external/tensorflow/tensorflow/lite/delegates/gpu/common/transformations/ |
D | global_pooling_to_reduce_op.cc | 35 const BHWC& dst_shape) { in IsGlobalPooling() argument 36 return dst_shape.w == 1 && dst_shape.h == 1 && attr.kernel.w == src_shape.w && in IsGlobalPooling() 43 const BHWC& src_shape, const BHWC& dst_shape) { in IsGlobalAveragePooling() argument 46 IsGlobalPooling(attr, src_shape, dst_shape); in IsGlobalAveragePooling()
|