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

Method run_op

src/gpu/cl/kernels/ClMatMulLowpNativeMMULKernel.cpp:239–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237}
238
239void ClMatMulLowpNativeMMULKernel::run_op(ITensorPack &tensors, const Window &window, cl::CommandQueue &queue)
240{
241 ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
242 ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(ICLKernel::window(), window);
243
244 const auto *lhs =
245 utils::cast::polymorphic_downcast<const ICLTensor *>(tensors.get_const_tensor(TensorType::ACL_SRC_0));
246 const auto *rhs =
247 utils::cast::polymorphic_downcast<const ICLTensor *>(tensors.get_const_tensor(TensorType::ACL_SRC_1));
248 const auto *bias = utils::cast::polymorphic_downcast<const ICLTensor *>(
249 tensors.get_const_tensor(TensorType::ACL_SRC_2)); // nullptr if bias is not present
250 auto *dst = utils::cast::polymorphic_downcast<ICLTensor *>(tensors.get_tensor(TensorType::ACL_DST));
251
252 ARM_COMPUTE_ERROR_ON_NULLPTR(lhs, rhs, dst);
253 ARM_COMPUTE_LOG_PARAMS(lhs, rhs, bias, dst);
254
255 unsigned int idx = 0;
256 add_3d_tensor_nhw_argument(idx, lhs);
257 add_3d_tensor_nhw_argument(idx, rhs);
258
259 if (bias != nullptr)
260 {
261 add_3d_tensor_nhw_argument(idx, bias);
262 }
263 add_3d_tensor_nhw_argument(idx, dst);
264
265 // LWS_x should be multiple of 16 at least. (32, 2) has been chosen to have more work-items on a single core
266 // LWS also enforces the order of execution of the work items which improves cache utilization
267 enqueue(queue, *this, window, cl::NDRange(32, 2), false);
268}
269
270} // namespace kernels
271} // namespace opencl

Callers

nothing calls this directly

Calls 3

get_const_tensorMethod · 0.80
NDRangeClass · 0.50
get_tensorMethod · 0.45

Tested by

no test coverage detected