MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / run

Method run

src/cpu/operators/CpuPool2d.cpp:114–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114void 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
144experimental::MemoryRequirements CpuPool2d::workspace() const
145{

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.45
schedule_opMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected