XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame^] | 1 | // Copyright (c) Facebook, Inc. and its affiliates. |
| 2 | // All rights reserved. |
| 3 | // |
| 4 | // Copyright 2019 Google LLC |
| 5 | // |
| 6 | // This source code is licensed under the BSD-style license found in the |
| 7 | // LICENSE file in the root directory of this source tree. |
| 8 | |
| 9 | #pragma once |
| 10 | |
| 11 | #include <stddef.h> |
| 12 | #include <stdint.h> |
| 13 | |
| 14 | #include <xnnpack/params.h> |
| 15 | #include <xnnpack/common.h> |
| 16 | |
| 17 | #ifdef __cplusplus |
| 18 | extern "C" { |
| 19 | #endif |
| 20 | |
| 21 | #define DECLARE_F32_DWCONV_UNIPASS_UKERNEL_FUNCTION(fn_name) \ |
| 22 | XNN_INTERNAL void fn_name( \ |
| 23 | size_t channels, \ |
| 24 | size_t output_width, \ |
| 25 | const float** input, \ |
| 26 | const float* weights, \ |
| 27 | float* output, \ |
| 28 | size_t input_stride, \ |
| 29 | size_t output_increment, \ |
| 30 | const union xnn_f32_output_params* params); |
| 31 | |
| 32 | DECLARE_F32_DWCONV_UNIPASS_UKERNEL_FUNCTION(xnn_f32_dwconv_ukernel_up1x25__scalar) |
| 33 | DECLARE_F32_DWCONV_UNIPASS_UKERNEL_FUNCTION(xnn_f32_dwconv_ukernel_up1x4__scalar) |
| 34 | DECLARE_F32_DWCONV_UNIPASS_UKERNEL_FUNCTION(xnn_f32_dwconv_ukernel_up1x9__scalar) |
| 35 | DECLARE_F32_DWCONV_UNIPASS_UKERNEL_FUNCTION(xnn_f32_dwconv_ukernel_up4x25__psimd) |
| 36 | DECLARE_F32_DWCONV_UNIPASS_UKERNEL_FUNCTION(xnn_f32_dwconv_ukernel_up4x25__sse) |
| 37 | DECLARE_F32_DWCONV_UNIPASS_UKERNEL_FUNCTION(xnn_f32_dwconv_ukernel_up4x4__psimd) |
| 38 | DECLARE_F32_DWCONV_UNIPASS_UKERNEL_FUNCTION(xnn_f32_dwconv_ukernel_up4x4__sse) |
| 39 | DECLARE_F32_DWCONV_UNIPASS_UKERNEL_FUNCTION(xnn_f32_dwconv_ukernel_up4x9__aarch64_neonfma) |
| 40 | DECLARE_F32_DWCONV_UNIPASS_UKERNEL_FUNCTION(xnn_f32_dwconv_ukernel_up4x9__aarch64_neonfma_cortex_a55) |
| 41 | DECLARE_F32_DWCONV_UNIPASS_UKERNEL_FUNCTION(xnn_f32_dwconv_ukernel_up4x9__neon) |
| 42 | DECLARE_F32_DWCONV_UNIPASS_UKERNEL_FUNCTION(xnn_f32_dwconv_ukernel_up4x9__neonfma) |
| 43 | DECLARE_F32_DWCONV_UNIPASS_UKERNEL_FUNCTION(xnn_f32_dwconv_ukernel_up4x9__psimd) |
| 44 | DECLARE_F32_DWCONV_UNIPASS_UKERNEL_FUNCTION(xnn_f32_dwconv_ukernel_up4x9__sse) |
| 45 | DECLARE_F32_DWCONV_UNIPASS_UKERNEL_FUNCTION(xnn_f32_dwconv_ukernel_up8x9__neonfma) |
| 46 | |
| 47 | |
| 48 | #define DECLARE_Q8_DWCONV_UNIPASS_UKERNEL_FUNCTION(fn_name) \ |
| 49 | XNN_INTERNAL void fn_name( \ |
| 50 | size_t channels, \ |
| 51 | size_t output_width, \ |
| 52 | const uint8_t** input, \ |
| 53 | const void* weights, \ |
| 54 | uint8_t* output, \ |
| 55 | size_t input_stride, \ |
| 56 | size_t output_increment, \ |
| 57 | const union xnn_q8_gemm_params* params); |
| 58 | |
| 59 | DECLARE_Q8_DWCONV_UNIPASS_UKERNEL_FUNCTION(xnn_q8_dwconv_ukernel_up1x9__scalar) |
| 60 | DECLARE_Q8_DWCONV_UNIPASS_UKERNEL_FUNCTION(xnn_q8_dwconv_ukernel_up8x9__aarch32_neon) |
| 61 | DECLARE_Q8_DWCONV_UNIPASS_UKERNEL_FUNCTION(xnn_q8_dwconv_ukernel_up8x9__neon) |
| 62 | DECLARE_Q8_DWCONV_UNIPASS_UKERNEL_FUNCTION(xnn_q8_dwconv_ukernel_up8x9__sse2) |
| 63 | |
| 64 | |
| 65 | #define DECLARE_F32_DWCONV_SPCHW_UKERNEL_FUNCTION(fn_name) \ |
| 66 | XNN_INTERNAL void fn_name( \ |
| 67 | size_t m, \ |
| 68 | size_t n, \ |
| 69 | const float* input, \ |
| 70 | const float* weights, \ |
| 71 | float* output, \ |
| 72 | size_t input_tuple_stride, \ |
| 73 | size_t output_tuple_stride, \ |
| 74 | size_t input_height_stride, \ |
| 75 | size_t output_height_stride, \ |
| 76 | const union xnn_f32_spchw_params* params); |
| 77 | |
| 78 | DECLARE_F32_DWCONV_SPCHW_UKERNEL_FUNCTION(xnn_f32_dwconv_spchw_ukernel_3x3p1__neonfma) |
| 79 | DECLARE_F32_DWCONV_SPCHW_UKERNEL_FUNCTION(xnn_f32_dwconv_spchw_ukernel_5x5p2__neonfma) |
| 80 | DECLARE_F32_DWCONV_SPCHW_UKERNEL_FUNCTION(xnn_f32_dwconv_spchw_ukernel_3x3p1__sse) |
| 81 | DECLARE_F32_DWCONV_SPCHW_UKERNEL_FUNCTION(xnn_f32_dwconv_spchw_ukernel_3x3s2p1__neonfma) |
| 82 | DECLARE_F32_DWCONV_SPCHW_UKERNEL_FUNCTION(xnn_f32_dwconv_spchw_ukernel_5x5s2p2__neonfma) |
| 83 | DECLARE_F32_DWCONV_SPCHW_UKERNEL_FUNCTION(xnn_f32_dwconv_spchw_ukernel_3x3s2p1__sse) |
| 84 | |
| 85 | |
| 86 | #ifdef __cplusplus |
| 87 | } /* extern "C" */ |
| 88 | #endif |