Skip to content

Commit 946cbf7

Browse files
committed
Improvements to geekbench run
1 parent 4eb72a2 commit 946cbf7

6 files changed

Lines changed: 1352 additions & 141 deletions

File tree

automation/script/module.py

Lines changed: 44 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,17 +1002,18 @@ def _run(self, i):
10021002
if r['return'] > 0:
10031003
return r
10041004

1005-
# Check chain of prehook dependencies on other MLC scripts.
1006-
# (No execution of customize.py for cached scripts)
1007-
logger.debug(
1008-
self.recursion_spaces +
1009-
' - Checking prehook dependencies on other MLC scripts:')
1005+
if len(prehook_deps):
1006+
# Check chain of prehook dependencies on other MLC scripts.
1007+
# (No execution of customize.py for cached scripts)
1008+
logger.debug(
1009+
self.recursion_spaces +
1010+
' - Checking prehook dependencies on other MLC scripts:')
10101011

1011-
r = self._call_run_deps(prehook_deps, self.local_env_keys, local_env_keys_from_meta,
1012+
r = self._call_run_deps(prehook_deps, self.local_env_keys, local_env_keys_from_meta,
10121013
self.recursion_spaces + extra_recursion_spaces,
10131014
variation_tags_string, True, debug_script_tags, show_time, extra_recursion_spaces, run_state)
1014-
if r['return'] > 0:
1015-
return r
1015+
if r['return'] > 0:
1016+
return r
10161017

10171018
# Continue with the selected cached script
10181019
cached_script = found_cached_scripts[selection]
@@ -1052,38 +1053,40 @@ def _run(self, i):
10521053
'append_unique': True})
10531054

10541055
utils.merge_dicts(
1055-
{'dict1': new_env, 'dict2': const, 'append_lists': True, 'append_unique': True})
1056-
utils.merge_dicts({'dict1': new_state,
1056+
{'dict1': env, 'dict2': const, 'append_lists': True, 'append_unique': True})
1057+
utils.merge_dicts({'dict1': state,
10571058
'dict2': const_state,
10581059
'append_lists': True,
10591060
'append_unique': True})
10601061

10611062
if not fake_run:
1063+
1064+
clean_env_keys_post_deps = meta.get('clean_env_keys_post_deps', [])
1065+
10621066
# Check chain of posthook dependencies on other MLC scripts. We consider them same as postdeps when
10631067
# script is in cache
1064-
logger.debug(
1065-
self.recursion_spaces +
1066-
' - Checking posthook dependencies on other MLC scripts:')
1068+
if len(posthook_deps):
1069+
logger.debug(
1070+
self.recursion_spaces +
1071+
' - Checking posthook dependencies on other MLC scripts:')
10671072

1068-
clean_env_keys_post_deps = meta.get(
1069-
'clean_env_keys_post_deps', [])
1070-
1071-
r = self._call_run_deps(posthook_deps, self.local_env_keys, clean_env_keys_post_deps,
1073+
r = self._call_run_deps(posthook_deps, self.local_env_keys, clean_env_keys_post_deps,
10721074
self.recursion_spaces + extra_recursion_spaces,
10731075
variation_tags_string, True, debug_script_tags, show_time, extra_recursion_spaces, run_state)
1074-
if r['return'] > 0:
1075-
return r
1076+
if r['return'] > 0:
1077+
return r
10761078

1077-
logger.debug(
1078-
self.recursion_spaces +
1079-
' - Checking post dependencies on other MLC scripts:')
1079+
if len(post_deps):
1080+
logger.debug(
1081+
self.recursion_spaces +
1082+
' - Checking post dependencies on other MLC scripts:')
10801083

1081-
# Check chain of post dependencies on other MLC scripts
1082-
r = self._call_run_deps(post_deps, self.local_env_keys, clean_env_keys_post_deps,
1084+
# Check chain of post dependencies on other MLC scripts
1085+
r = self._call_run_deps(post_deps, self.local_env_keys, clean_env_keys_post_deps,
10831086
self.recursion_spaces + extra_recursion_spaces,
10841087
variation_tags_string, True, debug_script_tags, show_time, extra_recursion_spaces, run_state)
1085-
if r['return'] > 0:
1086-
return r
1088+
if r['return'] > 0:
1089+
return r
10871090

10881091
if renew or (not found_cached and num_found_cached_scripts == 0):
10891092
# Add more tags to cached tags
@@ -1537,6 +1540,7 @@ def _run(self, i):
15371540
if r['return'] > 0:
15381541
return r
15391542

1543+
15401544
# Check chain of pre hook dependencies on other MLC scripts
15411545
if len(prehook_deps) > 0:
15421546
logger.debug(
@@ -1888,18 +1892,6 @@ def _run(self, i):
18881892
import json
18891893
logger.info(json.dumps(rr, indent=2))
18901894

1891-
if show_time:
1892-
logger.info(
1893-
self.recursion_spaces +
1894-
' - running time of script "{}": {:.2f} sec.'.format(
1895-
','.join(found_script_tags),
1896-
elapsed_time))
1897-
else:
1898-
logger.debug(
1899-
self.recursion_spaces +
1900-
' - running time of script "{}": {:.2f} sec.'.format(
1901-
','.join(found_script_tags),
1902-
elapsed_time))
19031895

19041896
if not recursion and show_space:
19051897
stop_disk_stats = shutil.disk_usage("/")
@@ -1922,12 +1914,25 @@ def _run(self, i):
19221914

19231915
v = new_env.get(p, None)
19241916

1925-
logger.info('{}: {}'.format(t, str(v)))
1917+
logger.info(self.recursion_spaces + ' * {}: {}'.format(t, str(v)))
19261918

19271919
# Check if print nice versions
19281920
if print_versions:
19291921
self._print_versions(run_state)
19301922

1923+
if show_time:
1924+
logger.info(
1925+
self.recursion_spaces +
1926+
' - running time of script "{}": {:.2f} sec.'.format(
1927+
','.join(found_script_tags),
1928+
elapsed_time))
1929+
else:
1930+
logger.debug(
1931+
self.recursion_spaces +
1932+
' - running time of script "{}": {:.2f} sec.'.format(
1933+
','.join(found_script_tags),
1934+
elapsed_time))
1935+
19311936
# Check if pause (useful if running a given script in a new terminal
19321937
# that may close automatically)
19331938
if i.get('pause', False):

script/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MLCommons Automation Scripts
22

3-
*Last updated: 2026-03-06 15:50:52*
3+
*Last updated: 2026-03-19 02:02:58*
44

55
This directory contains automation scripts for MLPerf benchmarks, AI/ML workflows, and development operations.
66

0 commit comments

Comments
 (0)