1 /*******************************************************************************
2 * Copyright 2021 Arm Ltd. and affiliates
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *******************************************************************************/
16 
17 #include "cpu/aarch64/acl_indirect_gemm_convolution.hpp"
18 
19 namespace dnnl {
20 namespace impl {
21 namespace cpu {
22 namespace aarch64 {
23 
execute_forward(const exec_ctx_t & ctx) const24 status_t acl_indirect_gemm_convolution_fwd_t::execute_forward(
25         const exec_ctx_t &ctx) const {
26     // Lock here is needed because resource_mapper does not support
27     // concurrent multithreaded access.
28     std::lock_guard<std::mutex> _lock {this->mtx};
29     // Retrieve primitive resource and configured Compute Library objects
30     auto *acl_resource
31             = ctx.get_resource_mapper()->get<acl_indirect_gemm_resource_t>(
32                     this);
33     acl_obj_t<arm_compute::NEGEMMConv2d> &acl_indirect_gemm_obj
34             = acl_resource->get_acl_obj();
35 
36     return execute_forward_conv_acl<acl_obj_t<arm_compute::NEGEMMConv2d>, pd_t,
37             data_t>(ctx, acl_indirect_gemm_obj, pd());
38 }
39 
40 } // namespace aarch64
41 } // namespace cpu
42 } // namespace impl
43 } // namespace dnnl
44