MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / add_padding_x

Function add_padding_x

tests/validation/Helpers.cpp:335–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333}
334
335void add_padding_x(std::initializer_list<ITensor *> tensors, const DataLayout &data_layout, bool only_right_pad)
336{
337 if (data_layout == DataLayout::NHWC)
338 {
339 constexpr unsigned int lower = 1U;
340 constexpr unsigned int upper = 16U;
341
342 std::uniform_int_distribution<unsigned int> distribution(lower, upper);
343 size_t seed_offset = 0;
344
345 for (ITensor *tensor : tensors)
346 {
347 ARM_COMPUTE_ERROR_ON(!tensor->info()->is_resizable());
348
349 std::mt19937 gen(library->seed() + seed_offset++);
350
351 const unsigned int right = distribution(gen);
352 const unsigned int left = only_right_pad ? 0 : distribution(gen);
353
354 tensor->info()->extend_padding(PaddingSize(0U, right, 0U, left));
355 }
356 }
357}
358
359QuantizationHint suggest_conv_dst_q_info_and_bias(const QuantizationInfo &in_q_info,
360 const QuantizationInfo &weight_q_info,

Callers 15

compute_targetMethod · 0.85
compute_targetMethod · 0.85
compute_gemmlowp_targetFunction · 0.85
compute_targetMethod · 0.85
compute_targetMethod · 0.85
compute_targetMethod · 0.85
compute_targetMethod · 0.85
compute_targetMethod · 0.85
compute_targetMethod · 0.85

Calls 4

seedMethod · 0.80
is_resizableMethod · 0.45
infoMethod · 0.45
extend_paddingMethod · 0.45

Tested by

no test coverage detected