Home
last modified time | relevance | path

Searched refs:DivideRoundUp (Results 1 – 25 of 93) sorted by relevance

1234

/external/tensorflow/tensorflow/lite/delegates/gpu/common/
Dutil_test.cc27 TEST(UtilTest, DivideRoundUp) { in TEST() argument
28 EXPECT_THAT(DivideRoundUp(0, 256), Eq(0)); in TEST()
29 EXPECT_THAT(DivideRoundUp(2u, 256), Eq(1)); in TEST()
30 EXPECT_THAT(DivideRoundUp(2, 256), Eq(1)); in TEST()
31 EXPECT_THAT(DivideRoundUp(255u, 256), Eq(1)); in TEST()
32 EXPECT_THAT(DivideRoundUp(255, 256), Eq(1)); in TEST()
33 EXPECT_THAT(DivideRoundUp(256u, 256), Eq(1)); in TEST()
34 EXPECT_THAT(DivideRoundUp(256, 256), Eq(1)); in TEST()
35 EXPECT_THAT(DivideRoundUp(257u, 256), Eq(2)); in TEST()
36 EXPECT_THAT(DivideRoundUp(257, 256), Eq(2)); in TEST()
Dutil.h27 T DivideRoundUp(T n, N divisor) { in DivideRoundUp() function
34 inline uint3 DivideRoundUp(uint3 n, uint3 divisor) { in DivideRoundUp() function
35 return uint3(DivideRoundUp(n.x, divisor.x), DivideRoundUp(n.y, divisor.y), in DivideRoundUp()
36 DivideRoundUp(n.z, divisor.z)); in DivideRoundUp()
43 return DivideRoundUp(number, n) * n; in AlignByN()
Dconvert.cc57 for (int p = 0; p < DivideRoundUp(shape.o, kPhwo4i4ChannelsInPlane); ++p) { in ConvertToPHWO4I4()
60 for (int c = 0; c < DivideRoundUp(shape.i, kPhwo4i4ChannelsInPlane); in ConvertToPHWO4I4()
118 DivideRoundUp(shape.o, 4)); in Get3DSizeForPHWO4I4()
135 const int dst_depth = DivideRoundUp(shape.o, 4); in ConvertToPHWO4I4()
136 const int src_depth = DivideRoundUp(shape.i, 4); in ConvertToPHWO4I4()
190 int32_t num_planes = DivideRoundUp(output_channels, kPiohw4ChannelsInPlane); in ConvertToPIOHW4()
243 int num_planes = DivideRoundUp(shape.c, kPhwc4ChannelsInPlane); in ConvertToPHWC4()
292 int num_planes = DivideRoundUp(shape.c, kPhwc4ChannelsInPlane); in ConvertToPHWC4Half()
418 int num_planes = DivideRoundUp(shape.c, kPhwc4ChannelsInPlane); in ConvertFromPHWC4()
460 int num_planes = DivideRoundUp(shape.c, kPhwc4ChannelsInPlane); in ConvertFromPHWC4Half()
/external/webrtc/rtc_base/numerics/
Ddivide_round_unittest.cc21 static_assert(DivideRoundUp(5, 1) == 5, ""); in TEST()
22 static_assert(DivideRoundUp(5, 2) == 3, ""); in TEST()
26 EXPECT_EQ(DivideRoundUp(uint8_t{0}, 1), 0); in TEST()
27 EXPECT_EQ(DivideRoundUp(uint8_t{0}, 3), 0); in TEST()
28 EXPECT_EQ(DivideRoundUp(int{0}, 1), 0); in TEST()
29 EXPECT_EQ(DivideRoundUp(int{0}, 3), 0); in TEST()
33 EXPECT_EQ(DivideRoundUp(uint8_t{255}, 2), 128); in TEST()
34 EXPECT_EQ(DivideRoundUp(std::numeric_limits<int>::max(), 2), in TEST()
127 static_assert(std::is_same<decltype(DivideRoundUp(TypeParam{100}, int8_t{3})), in TYPED_TEST()
131 std::is_same<decltype(DivideRoundUp(TypeParam{100}, int16_t{3})), in TYPED_TEST()
[all …]
/external/tensorflow/tensorflow/lite/delegates/gpu/common/task/
Dweights_conversion.h39 const int dst_slices = DivideRoundUp(weights.shape.o, 4); in RearrangeWeightsToOHWIOGroupI4O4()
40 const int src_slices = DivideRoundUp(weights.shape.i, 4); in RearrangeWeightsToOHWIOGroupI4O4()
41 const int dst_groups = DivideRoundUp(dst_slices, out_group_size); in RearrangeWeightsToOHWIOGroupI4O4()
75 const int dst_slices = DivideRoundUp(weights.shape.o, 4); in RearrangeWeightsToOHWIOGroupO4I4()
76 const int src_slices = DivideRoundUp(weights.shape.i, 4); in RearrangeWeightsToOHWIOGroupO4I4()
77 const int dst_groups = DivideRoundUp(dst_slices, out_group_size); in RearrangeWeightsToOHWIOGroupO4I4()
111 const int dst_slices = DivideRoundUp(weights.shape.o, 4); in RearrangeWeightsToODHWIOGroupI4O4()
112 const int src_slices = DivideRoundUp(weights.shape.i, 4); in RearrangeWeightsToODHWIOGroupI4O4()
113 const int dst_groups = DivideRoundUp(dst_slices, out_group_size); in RearrangeWeightsToODHWIOGroupI4O4()
149 const int dst_slices = DivideRoundUp(weights.shape.o, 4); in RearrangeWeightsToI4HWIOOGroupO4()
[all …]
Dutil.cc158 work_groups_count.x = DivideRoundUp(grid_size.x, work_group_size.x); in GetWorkGroupsCount()
159 work_groups_count.y = DivideRoundUp(grid_size.y, work_group_size.y); in GetWorkGroupsCount()
160 work_groups_count.z = DivideRoundUp(grid_size.z, work_group_size.z); in GetWorkGroupsCount()
/external/tensorflow/tensorflow/lite/delegates/gpu/common/tasks/
Dconv_metal.cc44 const int dst_depth = DivideRoundUp(dst_channels, 4); in GetNumOutputSlices()
622 const int dst_slices = DivideRoundUp(dst_shape.c, 4); in GetGroupsCount()
624 int grid_x = DivideRoundUp(dst_shape.w, block_size.x); in GetGroupsCount()
625 int grid_y = DivideRoundUp(dst_shape.h, block_size.y); in GetGroupsCount()
626 int grid_z = DivideRoundUp(dst_slices, block_size.z); in GetGroupsCount()
628 return DivideRoundUp(grid_x, wg_size.x) * DivideRoundUp(grid_y, wg_size.y) * in GetGroupsCount()
629 DivideRoundUp(grid_z, wg_size.z); in GetGroupsCount()
634 const int dst_slices = DivideRoundUp(dst_shape.c, 4); in GetGroupsCountForLinearWH()
636 int grid_x = DivideRoundUp(dst_shape.w, block_size.x); in GetGroupsCountForLinearWH()
637 int grid_y = DivideRoundUp(dst_shape.h, block_size.y); in GetGroupsCountForLinearWH()
[all …]
Dconv_constants.h36 const int dst_depth = DivideRoundUp(weights.shape.o, 4); in RearrangeWeightsForConvConstants()
37 const int src_depth = DivideRoundUp(weights.shape.i, 4); in RearrangeWeightsForConvConstants()
73 const int dst_depth = DivideRoundUp(weights.shape.o, 4); in RearrangeWeightsForConvConstantsDot()
74 const int src_depth = DivideRoundUp(weights.shape.i, 4); in RearrangeWeightsForConvConstantsDot()
111 const int src_depth = DivideRoundUp(weights.shape.i, 4); in UploadWeightsForConvConstants()
112 const int dst_depth = DivideRoundUp(weights.shape.o, 4); in UploadWeightsForConvConstants()
Dconv_buffer_1x1.cc303 const int dst_width_elements = DivideRoundUp( in GetGridSize()
306 DivideRoundUp(dst_width_elements, conv_params_.block_size.x); in GetGridSize()
308 DivideRoundUp(dst_[0]->Height(), conv_params_.block_size.y); in GetGridSize()
310 DivideRoundUp(dst_[0]->Slices(), conv_params_.block_size.z); in GetGridSize()
348 const int dst_depth = DivideRoundUp(attr.weights.shape.o, 4); in CreateConvBuffer1x1()
349 const int src_depth = DivideRoundUp(attr.weights.shape.i, 4); in CreateConvBuffer1x1()
366 const int dst_depth = DivideRoundUp(attr.weights.shape.o, 4); in CreateConvBuffer1x1()
367 const int src_depth = DivideRoundUp(attr.weights.shape.i, 4); in CreateConvBuffer1x1()
385 const int dst_depth = DivideRoundUp(attr.weights.shape.o, 4); in CreateConvBuffer1x1Wino4x4To6x6()
386 const int src_depth = DivideRoundUp(attr.weights.shape.i, 4); in CreateConvBuffer1x1Wino4x4To6x6()
[all …]
Dconv_constants.cc115 const int out_z = DivideRoundUp(weights_shape.o, 4); in GenerateConvolutionConstantCode()
117 const int src_depth = DivideRoundUp(weights_shape.i, 4); in GenerateConvolutionConstantCode()
233 const int src_depth = DivideRoundUp(src_channels, 4); in IsDotConvBetter()
234 const int dst_depth = DivideRoundUp(dst_channels, 4); in IsDotConvBetter()
252 const int src_depth = DivideRoundUp(w_shape.i, 4); in IsConvConstantsSupported()
253 const int dst_depth = DivideRoundUp(w_shape.o, 4); in IsConvConstantsSupported()
262 const int flt4_registers = DivideRoundUp(w_shape.o, 4); in IsConvConstantsSupported()
Dfully_connected.h94 const int src_depth = DivideRoundUp(src_channels, 4); in RearrangeFCWeightsToOIO4I4()
96 const int dst_depth = DivideRoundUp(dst_channels, 4); in RearrangeFCWeightsToOIO4I4()
150 const int src_depth = DivideRoundUp(weights.shape.i, 4); in UploadWeights()
151 const int dst_depth = DivideRoundUp(weights.shape.o, 4); in UploadWeights()
Dwinograd.cc194 int tiles_x = DivideRoundUp(new_width, 4); in GetGridSize()
195 int tiles_y = DivideRoundUp(new_height, 4); in GetGridSize()
204 int tiles_x = DivideRoundUp(new_width, 4); in BindArguments()
205 int tiles_y = DivideRoundUp(new_height, 4); in BindArguments()
448 const int tiles_x = DivideRoundUp( in BindArguments()
450 const int tiles_y = DivideRoundUp( in BindArguments()
667 const int tiles_x = DivideRoundUp(dst_[0]->Width(), 4); in BindArguments()
673 const int tiles_x = DivideRoundUp(dst_[0]->Width(), 4); in GetGridSize()
674 const int tiles_y = DivideRoundUp(dst_[0]->Height(), 4); in GetGridSize()
Dadd.cc29 int dst_depth = DivideRoundUp(dst_channels, 4); in CreateAdd()
30 int src0_depth = DivideRoundUp(channels[0], 4); in CreateAdd()
Ddepthwise_conv.h40 const int dst_depth = DivideRoundUp(dst_channels, 4); in RearrangeWeightsForDWConv2D()
71 const int dst_slices = DivideRoundUp(dst_channels, 4); in UploadWeightsForDWConv2D()
111 const int dst_slices = DivideRoundUp(dst_channels, 4); in RearrangeWeightsForDWConv3D()
145 const int dst_slices = DivideRoundUp(dst_channels, 4); in UploadWeightsForDWConv3D()
Dconvolution_transposed.h120 AlignByN(DivideRoundUp(weights.shape.o, 4), block_size_.w); in UploadWeights()
121 const int src_depth = DivideRoundUp(weights.shape.i, 4); in UploadWeights()
144 AlignByN(DivideRoundUp(weights.shape.o, 4), block_size_.w); in UploadWeights()
145 const int src_depth = DivideRoundUp(weights.shape.i, 4); in UploadWeights()
/external/tensorflow/tensorflow/lite/delegates/gpu/gl/kernels/
Dconv.cc62 {"src_depth", DivideRoundUp(weights.i, 4)}, in GenerateCode()
78 {"src_depth", DivideRoundUp(weights.i, 4)}, in GenerateCode()
191 DivideRoundUp(static_cast<int>(ctx.input_shapes[0][3]), 4)}, in GenerateCode()
196 MakeReadonlyObject(uint3(4, DivideRoundUp(attr.weights.shape.i, 4), in GenerateCode()
197 DivideRoundUp(attr.weights.shape.o, 4)), in GenerateCode()
234 auto dst_depth = DivideRoundUp(ctx.output_shapes[0][3], 4); in GenerateCode()
275 DivideRoundUp(ctx.output_shapes[0][3], 4)), in GenerateCode()
Dprelu.cc72 DivideRoundUp(static_cast<int>(ctx.output_shapes[0][3]), in GenerateCode()
104 DivideRoundUp(static_cast<int>(ctx.output_shapes[0][3]), 4)); in GenerateCode()
119 DivideRoundUp(static_cast<int>(ctx.output_shapes[0][3]), in GenerateCode()
139 DivideRoundUp(static_cast<int>(ctx.output_shapes[0][3]), in GenerateCode()
Dmul.cc112 DivideRoundUp(static_cast<int>(ctx.input_shapes[0][3]), 4)), in GenerateMultiplyScalarCode()
129 DivideRoundUp(static_cast<int>(ctx.input_shapes[0][3]), 4)), in GenerateMultiplyScalarCode()
137 DivideRoundUp(static_cast<int>(ctx.input_shapes[0][3]), 4)), in GenerateMultiplyScalarCode()
Dfully_connected.cc42 const int src_depth = DivideRoundUp(attr.weights.shape.i, 4); in GenerateCode()
43 const int dst_depth = DivideRoundUp(attr.weights.shape.o, 4); in GenerateCode()
/external/tensorflow/tensorflow/lite/delegates/gpu/metal/
Dcompute_task.cc42 work_groups_count.x = DivideRoundUp(grid_size.x, work_group_size.x); in GetWorkGroupsCount()
47 wgs.x = DivideRoundUp(grid_size.x, work_group_size.x); in GetWorkGroupsCount()
48 wgs.y = DivideRoundUp(grid_size.y, work_group_size.y); in GetWorkGroupsCount()
54 wgs.x = DivideRoundUp(grid_size.x, work_group_size.x); in GetWorkGroupsCount()
55 wgs.y = DivideRoundUp(grid_size.y, work_group_size.y); in GetWorkGroupsCount()
56 wgs.z = DivideRoundUp(grid_size.z, work_group_size.z); in GetWorkGroupsCount()
Dbuffer_convert.mm25 using ::tflite::gpu::DivideRoundUp;
115 int slices = DivideRoundUp(shape.c, 4);
116 int groups_x = DivideRoundUp(shape.w * shape.b, group_size.width);
117 int groups_y = DivideRoundUp(shape.h, group_size.height);
118 int groups_z = DivideRoundUp(slices, group_size.depth);
/external/tensorflow/tensorflow/lite/delegates/gpu/cl/
Dcl_operation.cc27 work_groups_count.x = DivideRoundUp(grid_size.x, work_group_size.x); in GetWorkGroupsCount()
32 wgs.x = DivideRoundUp(grid_size.x, work_group_size.x); in GetWorkGroupsCount()
33 wgs.y = DivideRoundUp(grid_size.y, work_group_size.y); in GetWorkGroupsCount()
39 wgs.x = DivideRoundUp(grid_size.x, work_group_size.x); in GetWorkGroupsCount()
40 wgs.y = DivideRoundUp(grid_size.y, work_group_size.y); in GetWorkGroupsCount()
41 wgs.z = DivideRoundUp(grid_size.z, work_group_size.z); in GetWorkGroupsCount()
/external/tensorflow/tensorflow/lite/delegates/gpu/gl/
Dobject.h156 DivideRoundUp(static_cast<uint32_t>(data.size()), 4U), data); in MakeReadonlyObject()
161 DivideRoundUp(static_cast<uint32_t>(data.size()), 4U), data); in MakeReadonlyTexture()
166 DivideRoundUp(static_cast<uint32_t>(data.size()), 4U), data); in MakeReadonlyBuffer()
175 size.z = shape.b * DivideRoundUp(shape.c, 4); in GetPHWC4Size()
/external/tensorflow/tensorflow/lite/delegates/gpu/common/tasks/special/
Dfc_fc_add.h70 const int src_depth = DivideRoundUp(src_channels, 4); in RearrangeFCWeightsToOIO4I4()
72 const int dst_depth = DivideRoundUp(dst_channels, 4); in RearrangeFCWeightsToOIO4I4()
127 const int src_depth = DivideRoundUp(weights.shape.i, 4); in UploadWeights()
128 const int dst_depth = DivideRoundUp(weights.shape.o, 4); in UploadWeights()
/external/tensorflow/tensorflow/lite/delegates/gpu/gl/converters/
Dbhwc_to_phwc4.cc91 uint3 workload = uint3(shape.w, shape.h, DivideRoundUp(shape.c, 4)); in Convert()
92 uint3 num_workgroups = DivideRoundUp(workload, workgroup_size_); in Convert()

1234