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

Method run

src/core/CL/kernels/CLQLSTMLayerNormalizationKernel.cpp:180–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180void CLQLSTMLayerNormalizationKernel::run(const Window &window, cl::CommandQueue &queue)
181{
182 ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
183 ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(ICLKernel::window(), window);
184
185 Window slice = window.first_slice_window_2D();
186 // Set slice step equal to width to force gws[0] to 1, as each thread normalizes across all rows
187 slice.set_dimension_step(Window::DimX, _input->info()->dimension(0));
188
189 Window weight_window;
190 Window weight_slice;
191
192 weight_window.use_tensor_dimensions(_weight->info()->tensor_shape());
193 weight_slice = weight_window.first_slice_window_1D();
194
195 do
196 {
197 unsigned int idx = 0;
198 add_2D_tensor_argument(idx, _input, slice);
199 add_1D_tensor_argument(idx, _weight, weight_slice);
200 add_1D_tensor_argument(idx, _bias, weight_slice);
201 add_2D_tensor_argument(idx, _output, slice);
202
203 enqueue(queue, *this, slice, lws_hint());
204 } while (window.slide_window_slice_2D(slice));
205}
206} // namespace arm_compute

Callers

nothing calls this directly

Calls 5

first_slice_window_2DMethod · 0.80
first_slice_window_1DMethod · 0.80
slide_window_slice_2DMethod · 0.80
dimensionMethod · 0.45
infoMethod · 0.45

Tested by

no test coverage detected