1 /** 2 * Copyright 2023 Huawei Technologies Co., Ltd 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either convolutionress or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifdef ENABLE_ARM32 18 #include "nnacl/kernel/convolution_winograd_arm32.h" 19 ConvWinoARM32InitGlobalVariable(ConvolutionBaseStruct * conv)20void ConvWinoARM32InitGlobalVariable(ConvolutionBaseStruct *conv) { 21 ConvolutionWinogradBaseStruct *winograd = (ConvolutionWinogradBaseStruct *)conv; 22 winograd->oc_block_ = C8NUM; 23 winograd->tmp_data_tile_ = C4NUM; 24 winograd->tile_num_ = C12NUM; 25 } 26 CreateConvWinogradARM32(ConvParameter * conv_param)27ConvolutionWinogradBaseStruct *CreateConvWinogradARM32(ConvParameter *conv_param) { 28 ConvolutionWinogradBaseStruct *winograd = 29 (ConvolutionWinogradBaseStruct *)malloc(sizeof(ConvolutionWinogradBaseStruct)); 30 NNACL_MALLOC_CHECK_NULL_RETURN_NULL(winograd); 31 memset(winograd, 0, sizeof(ConvolutionWinogradBaseStruct)); 32 33 winograd->config_input_output_ = ConvWinoBaseConfigInputOutput; 34 winograd->conv_.init_global_variable_ = ConvWinoARM32InitGlobalVariable; 35 36 winograd->conv_.base_.Prepare = ConvolutionWinogradBasePrepare; 37 winograd->conv_.base_.Resize = ConvolutionWinogradBaseResize; 38 winograd->conv_.base_.Release = ConvolutionWinogradBaseRelease; 39 winograd->conv_.base_.Compute = ConvolutionWinogradBaseCompute; 40 return winograd; 41 } 42 #endif 43