Skip to content

Commit e370dee

Browse files
committed
add mkldnn+acl build config for aarch64 platform
1 parent 5a1c4c5 commit e370dee

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.bazelrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ build:avx_windows --copt=/arch:AVX
9696

9797
build:mkl_open_source_only --define=tensorflow_mkldnn_contraction_kernel=1
9898

99+
# Config setting to build oneDNN with Compute Library for the Arm Architecture (ACL).
100+
build:mkl_aarch64_threadpool --define=build_with_mkl_aarch64=true
101+
build:mkl_aarch64_threadpool --@compute_library//:openmp=false
102+
build:mkl_aarch64_threadpool -c opt
103+
99104
# Disable clang extention that rejects type definitions within offsetof.
100105
# This was added in clang-16 by https://reviews.llvm.org/D133574.
101106
# Can be removed once upb is updated, since a type definition is used within

build/build.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,10 @@ async def main():
485485

486486
if not args.disable_mkl_dnn:
487487
logging.debug("Enabling MKL DNN")
488-
wheel_build_command.append("--config=mkl_open_source_only")
488+
if target_cpu == "aarch64":
489+
wheel_build_command.append("--config=mkl_aarch64_threadpool")
490+
else:
491+
wheel_build_command.append("--config=mkl_open_source_only")
489492

490493
if args.target_cpu_features == "release":
491494
if arch in ["x86_64", "AMD64"]:

0 commit comments

Comments
 (0)