Skip to content

Commit

Permalink
added env CM_PRE_RUN_CMD_EXTERNAL to inject extra commands before run…
Browse files Browse the repository at this point in the history
…ning MLPerf and other programs via CM
  • Loading branch information
gfursin committed Aug 16, 2024
1 parent 1f75a69 commit 410f426
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions script/benchmark-program/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,14 @@ def preprocess(i):

# generate the pre run cmd - recording runtime system infos
pre_run_cmd = ""

if env.get('CM_PRE_RUN_CMD_EXTERNAL', '') != '':
pre_run_cmd += env['CM_PRE_RUN_CMD_EXTERNAL']

if env.get('CM_PROFILE_NVIDIA_POWER', '') == "on":
if pre_run_cmd != '':
pre_run_cmd += ' && '

# running the script as a process in background
pre_run_cmd = pre_run_cmd + 'cm run script --tags=runtime,system,utilisation' + env['CM_SYS_UTILISATION_SCRIPT_TAGS'] + ' --quiet & '
# obtain the command if of the background process
Expand Down

0 comments on commit 410f426

Please sign in to comment.