From 8a164884dddf769643cf3b9f7f94e43cb4f3c20b Mon Sep 17 00:00:00 2001 From: ramelg01 Date: Thu, 7 Apr 2022 02:42:52 +0100 Subject: =?UTF-8?q?Update=20Neon=E2=84=A2=20depthwise=20kernel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Reduce duplication and simplify overall structure. - Improve multi-threaded performance by sharing more data in lower-level caches. Partially Resolves: COMPMID-5054 Signed-off-by: Ramy Elgammal Change-Id: Iac747f39b21c540122fa75218762631c4d787911 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/7449 Tested-by: Arm Jenkins Reviewed-by: Andrew Mundy Reviewed-by: Sheri Zhang Comments-Addressed: Arm Jenkins --- .../arm_conv/depthwise/interleaves/generic.cpp | 150 +++++++++++++++++++ .../arm_conv/depthwise/interleaves/generic.hpp | 80 ++++++++++ .../interleaves/generic_quantized_dot_product.cpp | 161 +++++++++++++++++++++ .../interleaves/generic_quantized_dot_product.hpp | 53 +++++++ .../arm_conv/depthwise/interleaves/list.hpp | 86 ++--------- 5 files changed, 457 insertions(+), 73 deletions(-) create mode 100644 src/core/NEON/kernels/arm_conv/depthwise/interleaves/generic.cpp create mode 100644 src/core/NEON/kernels/arm_conv/depthwise/interleaves/generic.hpp create mode 100644 src/core/NEON/kernels/arm_conv/depthwise/interleaves/generic_quantized_dot_product.cpp create mode 100644 src/core/NEON/kernels/arm_conv/depthwise/interleaves/generic_quantized_dot_product.hpp (limited to 'src/core/NEON/kernels/arm_conv/depthwise/interleaves') diff --git a/src/core/NEON/kernels/arm_conv/depthwise/interleaves/generic.cpp b/src/core/NEON/kernels/arm_conv/depthwise/interleaves/generic.cpp new file mode 100644 index 0000000000..056f08d037 --- /dev/null +++ b/src/core/NEON/kernels/arm_conv/depthwise/interleaves/generic.cpp @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2022 Arm Limited. + * + * SPDX-License-Identifier: MIT + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include "generic.hpp" + +#include + +namespace arm_conv { +namespace depthwise { +namespace interleaves { + +PackingArguments::PackingArguments( + unsigned int kernel_rows, unsigned int kernel_cols, size_t weight_element_size, + bool include_bias, size_t bias_element_size, + arm_gemm::VLType vl_type, size_t accumulator_element_size, unsigned int accumulator_depth_vl, + std::function get_weight_pos +) : kernel_rows(kernel_rows), kernel_cols(kernel_cols), weight_element_size(weight_element_size), + include_bias(include_bias), bias_element_size(bias_element_size), + vl_type(vl_type), accumulator_element_size(accumulator_element_size), accumulator_depth_vl(accumulator_depth_vl), + get_weight_pos(get_weight_pos) +{ +} + +size_t get_storage_size_generic(const PackingArguments &packing_args, const DepthwiseArgs &args) +{ + // If the channel multiplier is greater than one, then we treat this as a + // repeated packing of `channel_multiplier`-sized problems. + if (args.channel_multiplier > 1) + { + DepthwiseArgs args_per_input_channel(args); + args_per_input_channel.input_channels = args.channel_multiplier; + args_per_input_channel.channel_multiplier = 1; + + return args.input_channels * get_storage_size_generic(packing_args, args_per_input_channel); + } + + const unsigned int vl = + packing_args.accumulator_depth_vl * + arm_gemm::utils::get_vector_length(packing_args.vl_type) / packing_args.accumulator_element_size; + const unsigned int n_packs = arm_gemm::iceildiv(args.input_channels, vl); + const auto pack_size = (packing_args.include_bias ? packing_args.bias_element_size : 0) + + packing_args.kernel_points() * packing_args.weight_element_size; + return n_packs * pack_size * vl; +} + +void pack_parameters_generic( + const PackingArguments &packing_args, + const DepthwiseArgs &args, + void *buffer_raw, + const void *biases_raw, + const void *weights_raw, + size_t ld_weight_col, + size_t ld_weight_row +) +{ + // Cast the pointers to byte sizes + auto *buffer = static_cast(buffer_raw); + auto *biases = static_cast(biases_raw); + auto *weights = static_cast(weights_raw); + + // If the channel multiplier is greater than one, then we treat this as a + // repeated packing of `channel_multiplier`-sized problems. + if (args.channel_multiplier > 1) + { + // Get a modified copy of the depthwise arguments + DepthwiseArgs args_per_input_channel(args); + args_per_input_channel.input_channels = args.channel_multiplier; + args_per_input_channel.channel_multiplier = 1; + + // Resolve the strides here + ld_weight_col = ld_weight_col ? ld_weight_col : args.input_channels * args.channel_multiplier; + ld_weight_row = ld_weight_row ? ld_weight_row : ld_weight_col * packing_args.kernel_cols; + + auto per_input_channel_size = get_storage_size_generic(packing_args, args_per_input_channel); + + for (unsigned int c = 0; c < args.input_channels; c++) + { + pack_parameters_generic( + packing_args, args_per_input_channel, buffer, biases, weights, ld_weight_col, ld_weight_row); + + // Update the pointers + buffer += per_input_channel_size; + biases += (biases == nullptr) ? 0 : packing_args.bias_element_size * args.channel_multiplier; + weights += packing_args.weight_element_size * args.channel_multiplier; + } + return; + } + + // Finalise the weight strides + ld_weight_col = (ld_weight_col == 0) ? args.input_channels : ld_weight_col; + ld_weight_row = (ld_weight_row == 0) ? packing_args.kernel_cols * ld_weight_col : ld_weight_row; + + const unsigned int vl = + packing_args.accumulator_depth_vl * + arm_gemm::utils::get_vector_length(packing_args.vl_type) / packing_args.accumulator_element_size; + + for (unsigned int n = 0; n < args.input_channels; n += vl) + { + const unsigned int todo = std::min(vl, args.input_channels - n); + + if (packing_args.include_bias) + { + if (biases != nullptr) + { + memcpy(buffer, biases, todo * packing_args.bias_element_size); + biases += todo * packing_args.bias_element_size; + } + else + { + memset(buffer, 0, vl * packing_args.bias_element_size); + } + + buffer += vl * packing_args.bias_element_size; + } + + // Copy each of the weights in turn + unsigned int kx, ky; + for (int kindex = 0; packing_args.get_weight_pos(kindex, kx, ky); kindex++) + { + const auto src_ptr = weights + (kx*ld_weight_row + ky*ld_weight_col + n) * packing_args.weight_element_size; + memcpy(buffer, src_ptr, todo * packing_args.weight_element_size); + buffer += vl * packing_args.weight_element_size; + } + } +} + +} // namespace interleaves +} // namespace depthwise +} // namespace arm_conv diff --git a/src/core/NEON/kernels/arm_conv/depthwise/interleaves/generic.hpp b/src/core/NEON/kernels/arm_conv/depthwise/interleaves/generic.hpp new file mode 100644 index 0000000000..5b5ae17806 --- /dev/null +++ b/src/core/NEON/kernels/arm_conv/depthwise/interleaves/generic.hpp @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2022 Arm Limited. + * + * SPDX-License-Identifier: MIT + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#pragma once + +#include "src/core/NEON/kernels/arm_gemm/utils.hpp" +#include "depthwise.hpp" + +#include + +namespace arm_conv { +namespace depthwise { +namespace interleaves { + +struct PackingArguments +{ + const unsigned int kernel_rows; + const unsigned int kernel_cols; + const size_t weight_element_size; + const bool include_bias; + const size_t bias_element_size; + arm_gemm::VLType vl_type; + const size_t accumulator_element_size; + const unsigned int accumulator_depth_vl; + std::function get_weight_pos; + + unsigned int kernel_points(void) const { return kernel_cols * kernel_rows; } + + PackingArguments( + unsigned int kernel_rows, + unsigned int kernel_cols, + size_t weight_element_size, + bool include_bias, + size_t bias_element_size, + arm_gemm::VLType vl_type, + size_t accumulator_element_size, + unsigned int accumulator_depth_vl, + std::function get_weight_pos + ); +}; + +size_t get_storage_size_generic( + const PackingArguments &packing_args, + const DepthwiseArgs &args +); + +void pack_parameters_generic( + const PackingArguments &packing_args, + const DepthwiseArgs &args, + void *buffer_raw, + const void *biases_raw, + const void *weights_raw, + size_t ld_weight_col, + size_t ld_weight_row +); + +} // namespace interleaves +} // namespace depthwise +} // namespace arm_conv diff --git a/src/core/NEON/kernels/arm_conv/depthwise/interleaves/generic_quantized_dot_product.cpp b/src/core/NEON/kernels/arm_conv/depthwise/interleaves/generic_quantized_dot_product.cpp new file mode 100644 index 0000000000..a6389054d1 --- /dev/null +++ b/src/core/NEON/kernels/arm_conv/depthwise/interleaves/generic_quantized_dot_product.cpp @@ -0,0 +1,161 @@ +/* + * Copyright (c) 2022 Arm Limited. + * + * SPDX-License-Identifier: MIT + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include "generic_quantized_dot_product.hpp" +#include + +namespace arm_conv { +namespace depthwise { +namespace interleaves { +namespace quantized { + +size_t get_storage_size( + const DepthwiseArgs &args, + const arm_gemm::VLType vl_type, + const unsigned int accumulator_depth_vl +) +{ + // We produce VL channels at a time, for each of these blocks of + // channels we store a vector of biases, weights (complicated) and + // requantize parameters. + const unsigned int iter_length = accumulator_depth_vl * arm_gemm::utils::get_vector_length(vl_type); + const unsigned int n_iters = args.input_channels * arm_gemm::iceildiv(args.channel_multiplier, iter_length); + + // Compute the cost of storing the weights + const unsigned int n_dots_per_kernel_row = arm_gemm::iceildiv(args.kernel_cols, 4u); + + return n_iters * iter_length * ( + sizeof(int32_t) + // Bias + 4 * n_dots_per_kernel_row * args.kernel_rows * sizeof(int8_t) + // Weights + 2 * sizeof(int32_t) // Requantisation parameters + ); +} + +template +void pack_parameters( + void *_buffer, const int32_t *biases, + const T *weights, size_t ld_weight_col, size_t ld_weight_row, + const DepthwiseArgs &args, + const arm_gemm::Requantize32 &qp, + const arm_gemm::VLType vl_type, + const unsigned int accumulator_depth_vl +) +{ + auto buffer = static_cast(_buffer); + auto requant_muls = qp.per_channel_muls; + auto requant_shifts = qp.per_channel_right_shifts; + + const unsigned int iter_length = accumulator_depth_vl * arm_gemm::utils::get_vector_length(vl_type); + const unsigned int n_iters_per_input_channel = arm_gemm::iceildiv(args.channel_multiplier, iter_length); + const unsigned int n_dots_per_kernel_row = arm_gemm::iceildiv(args.kernel_cols, 4u); + + const size_t iter_stride = iter_length * ( + sizeof(int32_t) + // Bias + 4 * n_dots_per_kernel_row * args.kernel_rows * sizeof(T) + // Weights + 2 * sizeof(int32_t) // Requantisation parameters + ); + + ld_weight_col = (ld_weight_col == 0) ? args.input_channels * args.channel_multiplier : ld_weight_col; + ld_weight_row = (ld_weight_row == 0) ? args.kernel_cols * ld_weight_col : ld_weight_row; + + for (unsigned int input_channel = 0; input_channel < args.input_channels; input_channel++) + { + auto buffer_input_channel = buffer + input_channel * n_iters_per_input_channel * iter_stride; + auto weights_input_channel = weights + input_channel * args.channel_multiplier; + + for (unsigned int iter = 0; iter < n_iters_per_input_channel; iter++) + { + // Get a pointer to the start of this portion of the buffer; consequently + // derive pointers to the bias, weight and requantisation portions of + // this frame. + auto buffer_base = buffer_input_channel + iter_stride * iter; + auto buffer_biases = reinterpret_cast(buffer_base); + auto buffer_weights = buffer_base + sizeof(int32_t) * iter_length; + auto buffer_requant_mul = reinterpret_cast( + buffer_weights + args.kernel_rows * n_dots_per_kernel_row * 4 * iter_length); + auto buffer_requant_shift = buffer_requant_mul + iter_length; + auto weights_base = weights_input_channel + iter * iter_length; + + // Hence work through the data for this iteration, on a + // channel-by-channel basis. + const auto this_iter_length = std::min( + iter_length, args.channel_multiplier - iter * iter_length + ); + for (unsigned int i = 0; i < this_iter_length; i++) + { + auto weights_channel = weights_base + i; + + // Read the bias value, we modify this as we read the weights. + auto bias_value = biases == nullptr ? 0 : *(biases++); + int32_t elements_sum = 0; + + // Read through the kernel; for each row, marshal together as many dot + // product terms as are required. + for (unsigned int ki = 0; ki < args.kernel_rows; ki++) + { + auto buffer_row = buffer_weights + i*4 + ki * 4 * n_dots_per_kernel_row * iter_length; + auto weights_row = weights_channel + ki * ld_weight_row; + + unsigned int kj = 0; + for (; kj < args.kernel_cols; kj++) + { + // Determine which element to which we're writing + const auto dot = kj / 4; + const auto elem = kj % 4; + + // Copy the value; include in the sum + const auto val = weights_row[kj * ld_weight_col]; + buffer_row[dot * 4 * iter_length + elem] = val; + elements_sum += val; + } + for (; kj < 4 * n_dots_per_kernel_row; kj++) + { + const auto dot = kj / 4; + const auto elem = kj % 4; + buffer_row[dot * 4 * iter_length + elem] = 0; + } + + buffer_row += 4 * n_dots_per_kernel_row * iter_length; + } + + // Write back the bias and offset values + *(buffer_biases++) = + bias_value - qp.a_offset * elements_sum + + args.kernel_rows * args.kernel_cols * qp.a_offset * qp.b_offset; + + // Write out the requantisation parameters + *(buffer_requant_mul++) = qp.per_channel_requant ? *(requant_muls++) : qp.per_layer_mul; + *(buffer_requant_shift++) = qp.per_channel_requant ? *(requant_shifts++) : qp.per_layer_right_shift; + } + } + } +} + +template void pack_parameters(void *, const int32_t *, const int8_t *, size_t, size_t, const DepthwiseArgs &, const arm_gemm::Requantize32 &, arm_gemm::VLType, unsigned int); +template void pack_parameters(void *, const int32_t *, const uint8_t *, size_t, size_t, const DepthwiseArgs &, const arm_gemm::Requantize32 &, arm_gemm::VLType, unsigned int); + +} // namespace quantized +} // namespace interleaves +} // namespace depthwise +} // namespace arm_conv diff --git a/src/core/NEON/kernels/arm_conv/depthwise/interleaves/generic_quantized_dot_product.hpp b/src/core/NEON/kernels/arm_conv/depthwise/interleaves/generic_quantized_dot_product.hpp new file mode 100644 index 0000000000..779d67d3f4 --- /dev/null +++ b/src/core/NEON/kernels/arm_conv/depthwise/interleaves/generic_quantized_dot_product.hpp @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2022 Arm Limited. + * + * SPDX-License-Identifier: MIT + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#pragma once + +#include "generic.hpp" + +namespace arm_conv { +namespace depthwise { +namespace interleaves { +namespace quantized { + +size_t get_storage_size( + const DepthwiseArgs &args, + arm_gemm::VLType vl_type, + unsigned int accumulator_depth_vl=1 +); + +template +void pack_parameters( + void *buffer, const int32_t *biases, + const T *weights, size_t ld_weight_col, size_t ld_weight_row, + const DepthwiseArgs &args, + const arm_gemm::Requantize32 &qp, + arm_gemm::VLType vl_type, + unsigned int accumulator_depth_vl +); + +} // namespace quantized +} // namespace interleaves +} // namespace depthwise +} // namespace arm_conv diff --git a/src/core/NEON/kernels/arm_conv/depthwise/interleaves/list.hpp b/src/core/NEON/kernels/arm_conv/depthwise/interleaves/list.hpp index cb49a243af..76f38eb335 100644 --- a/src/core/NEON/kernels/arm_conv/depthwise/interleaves/list.hpp +++ b/src/core/NEON/kernels/arm_conv/depthwise/interleaves/list.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Arm Limited. + * Copyright (c) 2021-2022 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -29,90 +29,30 @@ namespace depthwise { #if defined(ARM_COMPUTE_ENABLE_SVE) -class interleave_sve_u8q_3x3_dot +struct interleave_sve_u8q_3x3_dot { - public: - static void pack_parameters(unsigned int, void *, const int32_t *, const uint8_t *, const arm_gemm::Requantize32 &, size_t, size_t); - static size_t get_packed_size(const DepthwiseArgs &); + static void pack_parameters(unsigned int, void *, const int32_t *, const uint8_t *, const arm_gemm::Requantize32 &, size_t, size_t); + static size_t get_packed_size(const DepthwiseArgs &); }; -class interleave_sve_s8q_3x3_dot +struct interleave_sve_s8q_3x3_dot { - public: - static void pack_parameters(unsigned int, void *, const int32_t *, const int8_t *, const arm_gemm::Requantize32 &, size_t, size_t); - static size_t get_packed_size(const DepthwiseArgs &); -}; - -class interleave_sve_u8q_3x3_mla -{ - public: - static void pack_parameters(unsigned int, void *, const uint8_t *, size_t, size_t); - static size_t get_packed_size(const DepthwiseArgs &); -}; - -class interleave_sve_s8q_3x3_mla -{ - public: - static void pack_parameters(unsigned int, void *, const int8_t *, size_t, size_t); - static size_t get_packed_size(const DepthwiseArgs &); -}; - -class interleave_sve_u8q_5x5_mla -{ - public: - static void pack_parameters(unsigned int, void *, const uint8_t *, size_t, size_t); - static size_t get_packed_size(const DepthwiseArgs &); -}; - -class interleave_sve_s8q_5x5_mla -{ - public: - static void pack_parameters(unsigned int, void *, const int8_t *, size_t, size_t); - static size_t get_packed_size(const DepthwiseArgs &); + static void pack_parameters(unsigned int, void *, const int32_t *, const int8_t *, const arm_gemm::Requantize32 &, size_t, size_t); + static size_t get_packed_size(const DepthwiseArgs &); }; #endif // defined(ARM_COMPUTE_ENABLE_SVE) -class interleave_a64_u8q_3x3_dot -{ - public: - static void pack_parameters(unsigned int, void *, const int32_t *, const uint8_t *, const arm_gemm::Requantize32 &, size_t, size_t); - static size_t get_packed_size(const DepthwiseArgs &); -}; - -class interleave_a64_s8q_3x3_dot -{ - public: - static void pack_parameters(unsigned int, void *, const int32_t *, const int8_t *, const arm_gemm::Requantize32 &, size_t, size_t); - static size_t get_packed_size(const DepthwiseArgs &); -}; - -class interleave_a64_u8q_3x3_mla -{ - public: - static void pack_parameters(unsigned int, void *, const uint8_t *, size_t, size_t); - static size_t get_packed_size(const DepthwiseArgs &); -}; - -class interleave_a64_s8q_3x3_mla -{ - public: - static void pack_parameters(unsigned int, void *, const int8_t *, size_t, size_t); - static size_t get_packed_size(const DepthwiseArgs &); -}; - -class interleave_a64_u8q_5x5_mla +struct interleave_a64_u8q_3x3_dot { - public: - static void pack_parameters(unsigned int, void *, const uint8_t *, size_t, size_t); - static size_t get_packed_size(const DepthwiseArgs &); + static void pack_parameters(unsigned int, void *, const int32_t *, const uint8_t *, const arm_gemm::Requantize32 &, size_t, size_t); + static size_t get_packed_size(const DepthwiseArgs &); }; -class interleave_a64_s8q_5x5_mla +struct interleave_a64_s8q_3x3_dot { - public: - static void pack_parameters(unsigned int, void *, const int8_t *, size_t, size_t); - static size_t get_packed_size(const DepthwiseArgs &); + static void pack_parameters(unsigned int, void *, const int32_t *, const int8_t *, const arm_gemm::Requantize32 &, size_t, size_t); + static size_t get_packed_size(const DepthwiseArgs &); }; } // namespace depthwise -- cgit v1.2.1