1 /* 2 * Copyright (c) Facebook, Inc. and its affiliates. 3 * All rights reserved. 4 * 5 * This source code is licensed under the BSD-style license found in the 6 * LICENSE file in the root directory of this source tree. 7 */ 8 9 #pragma once 10 11 #include <stddef.h> 12 #include <stdint.h> 13 14 #include <qnnpack/common.h> 15 #include <qnnpack/params.h> 16 17 #ifdef __cplusplus 18 extern "C" { 19 #endif 20 21 #define DECLARE_PYTORCH_Q8MPAVGPOOL_UKERNEL_FUNCTION(fn_name) \ 22 PYTORCH_QNNP_INTERNAL void fn_name( \ 23 size_t n, \ 24 size_t ks, \ 25 size_t kc, \ 26 const uint8_t** x, \ 27 const uint8_t* zero, \ 28 int32_t* buffer, \ 29 uint8_t* y, \ 30 size_t x_increment, \ 31 size_t y_increment, \ 32 const union pytorch_qnnp_avgpool_quantization_params* \ 33 quantization_params); 34 35 DECLARE_PYTORCH_Q8MPAVGPOOL_UKERNEL_FUNCTION(pytorch_q8avgpool_ukernel_mp8x9p8q__neon) 36 DECLARE_PYTORCH_Q8MPAVGPOOL_UKERNEL_FUNCTION(pytorch_q8avgpool_ukernel_mp8x9p8q__sse2) 37 38 #define DECLARE_PYTORCH_Q8UPAVGPOOL_UKERNEL_FUNCTION(fn_name) \ 39 PYTORCH_QNNP_INTERNAL void fn_name( \ 40 size_t n, \ 41 size_t ks, \ 42 size_t kc, \ 43 const uint8_t** x, \ 44 const uint8_t* zero, \ 45 uint8_t* y, \ 46 size_t x_increment, \ 47 size_t y_increment, \ 48 const union pytorch_qnnp_avgpool_quantization_params* \ 49 quantization_params); 50 51 DECLARE_PYTORCH_Q8UPAVGPOOL_UKERNEL_FUNCTION(pytorch_q8avgpool_ukernel_up8x9__neon) 52 DECLARE_PYTORCH_Q8UPAVGPOOL_UKERNEL_FUNCTION(pytorch_q8avgpool_ukernel_up8xm__neon) 53 DECLARE_PYTORCH_Q8UPAVGPOOL_UKERNEL_FUNCTION(pytorch_q8avgpool_ukernel_up8x9__sse2) 54 DECLARE_PYTORCH_Q8UPAVGPOOL_UKERNEL_FUNCTION(pytorch_q8avgpool_ukernel_up8xm__sse2) 55 56 #ifdef __cplusplus 57 } /* extern "C" */ 58 #endif 59