Skip to content

Commit 394ab4a

Browse files
authored
Merge branch 'mlcommons:dev' into dev
2 parents 234aad7 + 6ae3774 commit 394ab4a

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

script/get-aocc/customize.py

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,12 @@ def preprocess(i):
2020

2121
exe_c = 'clang.exe' if os_info['platform'] == 'windows' else 'clang'
2222

23-
if env.get('MLC_AOCC_DIR_PATH', '') != '' and env.get(
24-
'MLC_AOCC_BIN_WITH_PATH', '') == '':
25-
for f in os.listdir(env['MLC_AOCC_DIR_PATH']):
26-
if os.path.exists(os.path.join(
27-
env['MLC_AOCC_DIR_PATH'], f, "bin", exe_c)):
28-
env['MLC_AOCC_BIN_WITH_PATH'] = os.path.join(
29-
env['MLC_AOCC_DIR_PATH'], f, "bin", exe_c)
30-
31-
if env.get('MLC_HOST_OS_FLAVOR', '') == 'rhel':
32-
if "12" in env.get('MLC_VERSION', '') or "12" in env.get(
33-
'MLC_VERSION_MIN', ''):
34-
if env.get('MLC_TMP_PATH', '') == '':
35-
env['MLC_TMP_PATH'] = ''
36-
env['MLC_TMP_PATH'] += "/opt/rh/aocc/root/usr/bin"
37-
env['MLC_TMP_PATH_IGNORE_NON_EXISTANT'] = 'yes'
38-
3923
if 'MLC_AOCC_BIN_WITH_PATH' not in env:
24+
if env.get('MLC_AOCC_DIR_PATH', '') != '':
25+
aocc_path = env['MLC_AOCC_DIR_PATH']
26+
if os.path.exists(os.path.join(aocc_path, 'bin', 'clang')):
27+
env['MLC_TMP_PATH'] = os.path.join(aocc_path, 'bin')
28+
4029
r = i['automation'].find_artifact({'file_name': exe_c,
4130
'env': env,
4231
'os_info': os_info,

script/get-aocc/meta.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ deps:
2020

2121
input_mapping:
2222
tar_file_path: MLC_AOCC_TAR_FILE_PATH
23+
aocc_dir: MLC_AOCC_DIR_PATH
2324

2425
name: Detect or install AOCC compiler
2526
new_env_keys:

0 commit comments

Comments
 (0)