| 112 | } |
| 113 | |
| 114 | void CpuPool2d::run(ITensorPack &tensors) |
| 115 | { |
| 116 | ARM_COMPUTE_TRACE_EVENT(ARM_COMPUTE_PROF_CAT_CPU, ARM_COMPUTE_PROF_LVL_CPU, "CpuPool2d::run"); |
| 117 | ARM_COMPUTE_ERROR_ON_MSG(tensors.empty(), "No tensors provided"); |
| 118 | |
| 119 | if (_asm_glue) |
| 120 | { |
| 121 | const auto hints = (_is_global_pooling_layer) ? Window::DimX : Window::DimY; |
| 122 | NEScheduler::get().schedule_op(_asm_glue.get(), hints, _asm_glue->window(), tensors); |
| 123 | } |
| 124 | else |
| 125 | { |
| 126 | switch (_data_layout) |
| 127 | { |
| 128 | case DataLayout::NCHW: |
| 129 | NEScheduler::get().schedule_op(_pooling_layer_kernel.get(), |
| 130 | _is_global_pooling_layer ? Window::DimZ : Window::DimY, |
| 131 | _pooling_layer_kernel->window(), tensors); |
| 132 | break; |
| 133 | case DataLayout::NHWC: |
| 134 | NEScheduler::get().schedule_op(_pooling_layer_kernel.get(), |
| 135 | (_use_kernel_indices ? Window::DimY : Window::DimX), |
| 136 | _pooling_layer_kernel->window(), tensors); |
| 137 | break; |
| 138 | default: |
| 139 | ARM_COMPUTE_ERROR("Data layout not supported"); |
| 140 | } |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | experimental::MemoryRequirements CpuPool2d::workspace() const |
| 145 | { |
nothing calls this directly
no test coverage detected