| 38 | } |
| 39 | |
| 40 | void CpuWinogradConv2dTransformInputKernel::run_op(ITensorPack &tensors, const Window &window, const ThreadInfo &info) |
| 41 | { |
| 42 | ARM_COMPUTE_TRACE_EVENT(ARM_COMPUTE_PROF_CAT_CPU, ARM_COMPUTE_PROF_LVL_CPU, |
| 43 | "CpuWinogradConv2dTransformInputKernel::run_op"); |
| 44 | ARM_COMPUTE_UNUSED(window); |
| 45 | const ITensor *input_nhwc = tensors.get_const_tensor(TensorType::ACL_SRC); |
| 46 | const ITensor *winograd_input_transform = tensors.get_const_tensor(TensorType::ACL_DST); |
| 47 | const ITensor *workspace = tensors.get_const_tensor(TensorType::ACL_INT); |
| 48 | |
| 49 | const unsigned int width_idx = 1; |
| 50 | const unsigned int height_idx = 2; |
| 51 | const unsigned int batch_idx = 3; |
| 52 | int element_size_in_bytes = input_nhwc->info()->element_size(); |
| 53 | const auto src_strides = input_nhwc->info()->strides_in_bytes(); |
| 54 | |
| 55 | const size_t input_row_stride = src_strides[height_idx] / element_size_in_bytes; |
| 56 | const size_t input_col_stride = src_strides[width_idx] / element_size_in_bytes; |
| 57 | const size_t input_batch_stride = src_strides[batch_idx] / element_size_in_bytes; |
| 58 | const auto input_nhwc_ptr = |
| 59 | reinterpret_cast<const void *>(input_nhwc->buffer() + input_nhwc->info()->offset_first_element_in_bytes()); |
| 60 | auto win_transf_ptr = reinterpret_cast<void *>(winograd_input_transform->buffer() + |
| 61 | winograd_input_transform->info()->offset_first_element_in_bytes()); |
| 62 | |
| 63 | _winograd_impl.input_transform->execute(_conv_args, input_nhwc_ptr, input_batch_stride, input_row_stride, |
| 64 | input_col_stride, win_transf_ptr, _winograd_impl.winograd_spec, |
| 65 | workspace->buffer(), info.thread_id, _nthreads); |
| 66 | } |
| 67 | |
| 68 | CpuWinogradConv2dTransformOutputKernel::CpuWinogradConv2dTransformOutputKernel(arm_conv::winograd::WinogradImpl &w_impl, |
| 69 | arm_conv::ConvolutionArgs &_c_args, |
nothing calls this directly
no test coverage detected