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 | |
| 22 | #define DECLARE_F32_CONV_HWC_UKERNEL_FUNCTION(fn_name) \ |
| 23 | XNN_INTERNAL void fn_name( \ |
| 24 | size_t input_height, \ |
| 25 | size_t input_width, \ |
| 26 | size_t output_y_start, \ |
| 27 | size_t output_y_end, \ |
| 28 | const float* input, \ |
| 29 | const float* zero, \ |
| 30 | const float* weights, \ |
| 31 | float* output, \ |
| 32 | size_t input_padding_top, \ |
| 33 | size_t output_channels, \ |
| 34 | size_t output_height_stride, \ |
| 35 | size_t output_width_stride, \ |
Marat Dukhan | eb09a6b | 2020-04-08 17:34:32 -0700 | [diff] [blame] | 36 | const union xnn_f32_minmax_params* params); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 37 | |
Marat Dukhan | 56b10cd | 2020-05-18 09:35:49 -0700 | [diff] [blame] | 38 | DECLARE_F32_CONV_HWC_UKERNEL_FUNCTION(xnn_f32_conv_hwc_ukernel_3x3s2p1c3x4__neon_2x1) |
| 39 | DECLARE_F32_CONV_HWC_UKERNEL_FUNCTION(xnn_f32_conv_hwc_ukernel_3x3s2p1c3x8__neon_2x1) |
Marat Dukhan | ce7a3f8 | 2020-05-17 21:46:44 -0700 | [diff] [blame] | 40 | DECLARE_F32_CONV_HWC_UKERNEL_FUNCTION(xnn_f32_conv_hwc_ukernel_3x3s2p1c3x4__neon_2x2) |
| 41 | DECLARE_F32_CONV_HWC_UKERNEL_FUNCTION(xnn_f32_conv_hwc_ukernel_3x3s2p1c3x8__neon_2x2) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 42 | DECLARE_F32_CONV_HWC_UKERNEL_FUNCTION(xnn_f32_conv_hwc_ukernel_3x3s2p1c3x4__neonfma_2x2) |
Marat Dukhan | ce7a3f8 | 2020-05-17 21:46:44 -0700 | [diff] [blame] | 43 | DECLARE_F32_CONV_HWC_UKERNEL_FUNCTION(xnn_f32_conv_hwc_ukernel_3x3s2p1c3x8__neonfma_2x2) |
Marat Dukhan | 56b10cd | 2020-05-18 09:35:49 -0700 | [diff] [blame] | 44 | DECLARE_F32_CONV_HWC_UKERNEL_FUNCTION(xnn_f32_conv_hwc_ukernel_3x3s2p1c3x4__neonfma_2x1) |
| 45 | DECLARE_F32_CONV_HWC_UKERNEL_FUNCTION(xnn_f32_conv_hwc_ukernel_3x3s2p1c3x8__neonfma_2x1) |
Marat Dukhan | 6b7dfae | 2019-12-04 16:00:52 -0800 | [diff] [blame] | 46 | DECLARE_F32_CONV_HWC_UKERNEL_FUNCTION(xnn_f32_conv_hwc_ukernel_3x3s2p1c3x4__scalar_1x1) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 47 | |
Marat Dukhan | 56b10cd | 2020-05-18 09:35:49 -0700 | [diff] [blame] | 48 | DECLARE_F32_CONV_HWC_UKERNEL_FUNCTION(xnn_f32_conv_hwc_ukernel_3x3s2p0p1c3x4__neon_2x1) |
| 49 | DECLARE_F32_CONV_HWC_UKERNEL_FUNCTION(xnn_f32_conv_hwc_ukernel_3x3s2p0p1c3x8__neon_2x1) |
Marat Dukhan | ce7a3f8 | 2020-05-17 21:46:44 -0700 | [diff] [blame] | 50 | DECLARE_F32_CONV_HWC_UKERNEL_FUNCTION(xnn_f32_conv_hwc_ukernel_3x3s2p0p1c3x4__neon_2x2) |
| 51 | DECLARE_F32_CONV_HWC_UKERNEL_FUNCTION(xnn_f32_conv_hwc_ukernel_3x3s2p0p1c3x8__neon_2x2) |
| 52 | DECLARE_F32_CONV_HWC_UKERNEL_FUNCTION(xnn_f32_conv_hwc_ukernel_3x3s2p0p1c3x4__neonfma_2x2) |
| 53 | DECLARE_F32_CONV_HWC_UKERNEL_FUNCTION(xnn_f32_conv_hwc_ukernel_3x3s2p0p1c3x8__neonfma_2x2) |
Marat Dukhan | 56b10cd | 2020-05-18 09:35:49 -0700 | [diff] [blame] | 54 | DECLARE_F32_CONV_HWC_UKERNEL_FUNCTION(xnn_f32_conv_hwc_ukernel_3x3s2p0p1c3x4__neonfma_2x1) |
| 55 | DECLARE_F32_CONV_HWC_UKERNEL_FUNCTION(xnn_f32_conv_hwc_ukernel_3x3s2p0p1c3x8__neonfma_2x1) |
Marat Dukhan | ce7a3f8 | 2020-05-17 21:46:44 -0700 | [diff] [blame] | 56 | DECLARE_F32_CONV_HWC_UKERNEL_FUNCTION(xnn_f32_conv_hwc_ukernel_3x3s2p0p1c3x4__scalar_1x1) |
| 57 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 58 | |
Marat Dukhan | 1f29b80 | 2020-05-15 23:46:39 -0700 | [diff] [blame] | 59 | #define DECLARE_F32_CONV_HWC2CHW_UKERNEL_FUNCTION(fn_name) \ |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 60 | XNN_INTERNAL void fn_name( \ |
| 61 | size_t input_height, \ |
| 62 | size_t input_width, \ |
| 63 | size_t output_y_start, \ |
| 64 | size_t output_y_end, \ |
| 65 | const float* input, \ |
| 66 | const float* zero, \ |
| 67 | const float* weights, \ |
| 68 | float* output, \ |
| 69 | size_t input_padding_top, \ |
| 70 | size_t output_channels, \ |
| 71 | size_t output_height_stride, \ |
| 72 | size_t output_channel_stride, \ |
Marat Dukhan | eb09a6b | 2020-04-08 17:34:32 -0700 | [diff] [blame] | 73 | const union xnn_f32_minmax_params* params); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 74 | |
Marat Dukhan | 1f29b80 | 2020-05-15 23:46:39 -0700 | [diff] [blame] | 75 | DECLARE_F32_CONV_HWC2CHW_UKERNEL_FUNCTION(xnn_f32_conv_hwc2chw_ukernel_3x3s2p1c3x4__neonfma_2x2) |
| 76 | DECLARE_F32_CONV_HWC2CHW_UKERNEL_FUNCTION(xnn_f32_conv_hwc2chw_ukernel_3x3s2p1c3x4__scalar_1x1) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 77 | |
| 78 | |
| 79 | #ifdef __cplusplus |
Marat Dukhan | 80fc932 | 2019-09-29 21:06:36 -0700 | [diff] [blame] | 80 | } // extern "C" |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 81 | #endif |