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

Method run

src/core/CL/kernels/CLFuseBatchNormalizationKernel.cpp:250–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248}
249
250void CLFuseBatchNormalizationKernel::run(const arm_compute::Window &window, cl::CommandQueue &queue)
251{
252 ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
253 ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IKernel::window(), window);
254
255 // Create window slice
256 Window collapsed_window = window.collapse(window, Window::DimZ);
257 Window slice_1d = window.first_slice_window_1D();
258 Window slice_3d = collapsed_window.first_slice_window_3D();
259
260 // Add kernel arguments
261 unsigned int idx = 0;
262 add_3D_tensor_argument(idx, _input_weights, slice_3d);
263 if (_input_bias != nullptr)
264 {
265 add_1D_tensor_argument(idx, _input_bias, slice_1d);
266 }
267 add_1D_tensor_argument(idx, _bn_mean, slice_1d);
268 add_1D_tensor_argument(idx, _bn_var, slice_1d);
269 if (!_run_in_place_weights)
270 {
271 add_3D_tensor_argument(idx, _fused_weights, slice_3d);
272 }
273 if (!_run_in_place_bias)
274 {
275 add_1D_tensor_argument(idx, _fused_bias, slice_1d);
276 }
277 if (_bn_beta != nullptr)
278 {
279 add_1D_tensor_argument(idx, _bn_beta, slice_1d);
280 }
281 if (_bn_gamma != nullptr)
282 {
283 add_1D_tensor_argument(idx, _bn_gamma, slice_1d);
284 }
285 enqueue(queue, *this, slice_3d, lws_hint());
286}
287} // namespace arm_compute

Callers

nothing calls this directly

Calls 3

first_slice_window_1DMethod · 0.80
first_slice_window_3DMethod · 0.80
collapseMethod · 0.45

Tested by

no test coverage detected