Skip to content

Commit

Permalink
Fixes for MIL
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsuresh committed Jan 25, 2024
1 parent 38b9750 commit f1eb3d3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
4 changes: 2 additions & 2 deletions cm-mlops/script/app-mlperf-inference-cpp/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ int main(int argc, const char *argv[]) {
test_settings.performance_sample_count_override :
input_settings.performance_sample_count;

if (performance_sample_count != 0) {
test_settings.performance_sample_count_override = performance_sample_count;
if (performance_sample_count != 0) {//Its changed from user.conf
//test_settings.performance_sample_count_override = performance_sample_count;
}
if (max_sample_count != 0)
performance_sample_count =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,9 @@ def preprocess(i):
ranging_user_conf_file.write_text(ranging_user_conf)


if env.get('CM_MLPERF_LOADGEN_QUERY_COUNT','') == '' and query_count and (mode != "accuracy" or env['CM_MLPERF_RUN_STYLE'] != "valid"):
if (env.get('CM_MLPERF_LOADGEN_QUERY_COUNT','') == '') and query_count and ((mode != "accuracy") or (env['CM_MLPERF_RUN_STYLE'] != "valid")):
env['CM_MLPERF_LOADGEN_QUERY_COUNT'] = query_count


if not run_exists or rerun:

print("Output Dir: '" + OUTPUT_DIR + "'")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ division="closed"

POWER=" --power=yes --adr.mlperf-power-client.power_server=192.168.0.15 --adr.mlperf-power-client.port=4950 "
POWER=""

run "cm run script --tags=set,system,performance,mode"

#cpp
run "cm run script --tags=generate-run-cmds,inference,_find-performance \
--model=resnet50 --implementation=cpp --device=cpu --backend=onnxruntime \
--adr.compiler.tags=gcc \
--category=edge --division=open --scenario=Offline --quiet --test_query_count=100"
--category=edge --division=open --scenario=Offline --quiet --test_query_count=2000 "

run "cm run script --tags=generate-run-cmds,inference,_find-performance \
--model=retinanet --implementation=cpp --device=cpu --backend=onnxruntime \
Expand Down
11 changes: 9 additions & 2 deletions cm-mlops/script/run-mlperf-inference-app/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def preprocess(i):

print ('=========================================================')

local_keys = [ 'CM_MLPERF_SKIP_RUN', 'CM_MLPERF_LOADGEN_QUERY_COUNT' ]
for scenario in env['CM_MLPERF_LOADGEN_SCENARIOS']:
scenario_tags = tags + ",_"+scenario.lower()
env['CM_MLPERF_LOADGEN_SCENARIO'] = scenario
Expand Down Expand Up @@ -174,6 +175,10 @@ def preprocess(i):
if 'CM_MLPERF_DEVICE' in r['new_env']:
env['CM_MLPERF_DEVICE'] = r['new_env']['CM_MLPERF_DEVICE']

for key in local_keys:
if env.get(key, '') != '':
del(env[key])

if env.get("CM_MLPERF_LOADGEN_COMPLIANCE", "") == "yes":
for test in test_list:
env['CM_MLPERF_LOADGEN_COMPLIANCE_TEST'] = test
Expand All @@ -183,8 +188,10 @@ def preprocess(i):
copy.deepcopy(add_deps_recursive), 'adr': copy.deepcopy(adr), 'ad': ad, 'v': verbose, 'print_env': print_env, 'print_deps': print_deps})
if r['return'] > 0:
return r
if env.get('CM_MLPERF_SKIP_RUN', '') != '':
del(env['CM_MLPERF_SKIP_RUN'])

for key in local_keys:
if env.get(key, '') != '':
del(env[key])

return {'return':0}

Expand Down

0 comments on commit f1eb3d3

Please sign in to comment.