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

Method run

src/core/CL/kernels/CLBatchNormalizationLayerKernel.cpp:274–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272}
273
274void CLBatchNormalizationLayerKernel::run(const Window &window, cl::CommandQueue &queue)
275{
276 ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
277 ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IKernel::window(), window);
278
279 Window slice = window.first_slice_window_3D();
280
281 Window vector_slice = window.first_slice_window_1D();
282 vector_slice.set(Window::DimX, Window::Dimension(0, 0, 0));
283
284 unsigned int include_output = (!_run_in_place) ? 1 : 0;
285 unsigned int idx = (1 + include_output) * num_arguments_per_3D_tensor();
286 add_1D_tensor_argument(idx, _mean, vector_slice);
287 add_1D_tensor_argument(idx, _var, vector_slice);
288 if (_beta != nullptr)
289 {
290 add_1D_tensor_argument(idx, _beta, vector_slice);
291 }
292 if (_gamma != nullptr)
293 {
294 add_1D_tensor_argument(idx, _gamma, vector_slice);
295 }
296
297 do
298 {
299 idx = 0;
300 add_3D_tensor_argument(idx, _input, slice);
301 if (!_run_in_place)
302 {
303 add_3D_tensor_argument(idx, _output, slice);
304 }
305 enqueue(queue, *this, slice, lws_hint());
306 } while (window.slide_window_slice_3D(slice));
307}

Callers

nothing calls this directly

Calls 5

first_slice_window_3DMethod · 0.80
first_slice_window_1DMethod · 0.80
slide_window_slice_3DMethod · 0.80
DimensionClass · 0.50
setMethod · 0.45

Tested by

no test coverage detected