Skip to content

Commit e020a96

Browse files
author
Richard Top
committed
Fix KleidiAI -march/-mcpu conflict
1 parent 0ad9b6c commit e020a96

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

eb_hooks.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,12 @@ def parse_hook_tensorflow_h5py_glibc(ec, eprefix):
671671
'EOF\n'
672672
'python3 /tmp/fix_h5py.py && '
673673
)
674+
if get_eessi_envvar('EESSI_CPU_FAMILY') == 'aarch64':
675+
ec['prebuildopts'] = ec.get('prebuildopts', '') + (
676+
# KleidiAI in TF 2.18 has similar -march/-mcpu conflict as XNNPACK
677+
# The easyblock already excludes XNNPACK from -mcpu=native, extend the same exclusion to KleidiAI
678+
'sed -i \'s|--per_file_copt=-.*XNNPACK/.*@-mcpu=native|--per_file_copt=-.*XNNPACK/.*,-.*KleidiAI/.*@-mcpu=native|g\' .tf_configure.bazelrc && '
679+
)
674680
current_opts = ec.get('buildopts', [])
675681
if isinstance(current_opts, str):
676682
current_opts = current_opts.split()

0 commit comments

Comments
 (0)