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

Method run_op

src/gpu/cl/kernels/ClDirectConv3dKernel.cpp:260–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260void ClDirectConv3dKernel::run_op(ITensorPack &tensors, const Window &window, cl::CommandQueue &queue)
261{
262 ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
263 ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IKernel::window(), window);
264
265 const auto src =
266 utils::cast::polymorphic_downcast<const ICLTensor *>(tensors.get_const_tensor(TensorType::ACL_SRC_0));
267 const auto weights =
268 utils::cast::polymorphic_downcast<const ICLTensor *>(tensors.get_const_tensor(TensorType::ACL_SRC_1));
269 const auto biases =
270 utils::cast::polymorphic_downcast<const ICLTensor *>(tensors.get_const_tensor(TensorType::ACL_SRC_2));
271 auto dst = utils::cast::polymorphic_downcast<ICLTensor *>(tensors.get_tensor(TensorType::ACL_DST));
272
273 // Get initial windows
274 Window slice = window.first_slice_window_3D();
275 slice.set(Window::DimY, Window::Dimension(0,
276 ceil_to_multiple(dst->info()->dimension(1) * dst->info()->dimension(2) *
277 dst->info()->dimension(3),
278 slice.y().step()),
279 slice.y().step()));
280 slice.set(Window::DimZ, Window::Dimension(0, dst->info()->dimension(4), 1));
281
282 unsigned int idx = 0;
283 add_4D_tensor_argument(idx, src, slice);
284 add_4D_tensor_argument(idx, dst, slice);
285 add_4D_tensor_argument(idx, weights, slice);
286 if (biases != nullptr)
287 {
288 add_1D_tensor_argument(idx, biases, slice);
289 }
290 enqueue(queue, *this, slice, lws_hint());
291}
292} // namespace kernels
293} // namespace opencl
294} // namespace arm_compute

Callers

nothing calls this directly

Calls 10

ceil_to_multipleFunction · 0.85
get_const_tensorMethod · 0.80
first_slice_window_3DMethod · 0.80
stepMethod · 0.80
DimensionClass · 0.50
get_tensorMethod · 0.45
setMethod · 0.45
dimensionMethod · 0.45
infoMethod · 0.45
yMethod · 0.45

Tested by

no test coverage detected