xref: /aosp_15_r20/external/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/src/qnnpack/q8conv.h (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
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_Q8CONV_UKERNEL_FUNCTION(fn_name) \
22   PYTORCH_QNNP_INTERNAL void fn_name(            \
23       size_t mr,                                 \
24       size_t nr,                                 \
25       size_t kc,                                 \
26       size_t ks,                                 \
27       const uint8_t** a,                         \
28       const void* w,                             \
29       uint8_t* c,                                \
30       size_t c_stride,                           \
31       size_t output_channel_index,               \
32       const union pytorch_qnnp_conv_quantization_params* quantization_params);
33 
34 DECLARE_PYTORCH_Q8CONV_UKERNEL_FUNCTION(pytorch_q8conv_ukernel_4x8__neon)
35 DECLARE_PYTORCH_Q8CONV_UKERNEL_FUNCTION(pytorch_q8conv_ukernel_4x8__aarch32_neon)
36 DECLARE_PYTORCH_Q8CONV_UKERNEL_FUNCTION(pytorch_q8conv_ukernel_8x8__aarch64_neon)
37 DECLARE_PYTORCH_Q8CONV_UKERNEL_FUNCTION(pytorch_q8conv_ukernel_8x8__neon)
38 DECLARE_PYTORCH_Q8CONV_UKERNEL_FUNCTION(pytorch_q8conv_ukernel_4x4c2__sse2)
39 
40 #ifdef __cplusplus
41 } /* extern "C" */
42 #endif
43