build: cpu: aarch64: use installed Arm Compute Library (#1846)

Co-authored-by: Nathan Sircombe <nathan.sircombe@arm.com>
This commit is contained in:
Emanuele Rocca
2024-04-08 19:08:40 +02:00
committed by GitHub
parent f75fb2efcc
commit d8458feb5c
2 changed files with 4 additions and 8 deletions

View File

@ -24,14 +24,12 @@
find_path(ACL_INCLUDE_DIR
NAMES arm_compute/graph.h
PATHS ENV ACL_ROOT_DIR
NO_DEFAULT_PATH
)
find_library(ACL_LIBRARY
NAMES arm_compute
PATHS ENV ACL_ROOT_DIR
PATH_SUFFIXES build
NO_DEFAULT_PATH
PATH_SUFFIXES lib build
)
include(FindPackageHandleStandardArgs)
@ -56,7 +54,7 @@ if(ACL_FOUND)
find_library(ACL_GRAPH_LIBRARY
NAMES arm_compute_graph
PATHS ENV ACL_ROOT_DIR
PATH_SUFFIXES build
PATH_SUFFIXES lib build
)
list(APPEND ACL_INCLUDE_DIRS

View File

@ -1,7 +1,7 @@
/*******************************************************************************
* Copyright 2020-2023 Intel Corporation
* Copyright 2020 FUJITSU LIMITED
* Copyright 2022 Arm Ltd. and affiliates
* Copyright 2022-2024 Arm Ltd. and affiliates
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -37,8 +37,6 @@
#if DNNL_AARCH64_USE_ACL
// For checking if fp16 isa is supported on the platform
#include "arm_compute/core/CPP/CPPTypes.h"
// For setting the number of threads for ACL
#include "src/common/cpuinfo/CpuInfo.h"
#endif
#endif
@ -208,7 +206,7 @@ unsigned get_num_cores() {
#if DNNL_X64
return x64::cpu().getNumCores(Xbyak::util::CoreLevel);
#elif DNNL_AARCH64_USE_ACL
return arm_compute::cpuinfo::num_threads_hint();
return aarch64::cpu().getNumCores(Xbyak_aarch64::util::CoreLevel);
#else
return 1;
#endif