Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 8 additions & 23 deletions script/generate-mlperf-inference-submission/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ def generate_submission(i):
results = [f for f in os.listdir(results_dir) if not os.path.isfile(os.path.join(results_dir, f))]

system_meta_default = state['CM_SUT_META']

# set pytorch as the default framework
if system_meta_default['framework'] == '':
system_meta_default['framework'] = "pytorch"

system_meta = {}
if 'CM_MLPERF_SUBMISSION_SYSTEM_TYPE' in env:
system_meta['system_type'] = env['CM_MLPERF_SUBMISSION_SYSTEM_TYPE']
Expand Down Expand Up @@ -224,29 +229,9 @@ def generate_submission(i):
run_config = sut_info["run_config"]
new_res = f"{system}-{implementation}-{device}-{framework}-{run_config}"
else:
parts = res.split("-")
if len(parts) > 5: #result folder structure used by CM script
system = parts[0] if system == 'default' else system
implementation = parts[1]
device = parts[2]
framework = parts[3]
framework_version = parts[4]
run_config = parts[5]

print('* System: {}'.format(system))
print('* Implementation: {}'.format(implementation))
print('* Device: {}'.format(device))
print('* Framework: {}'.format(framework))
print('* Framework Version: {}'.format(framework_version))
print('* Run Config: {}'.format(run_config))

new_res = system + "-" + "-".join(parts[1:])

# Override framework and framework versions from the folder name
system_meta_default['framework'] = framework + " " + framework_version
else:
print(parts)
return {'return': 1, 'error': f"The required details for generating the inference submission:\n1.hardware_name\n2.implementation\n3.Device\n4.framework\n5.framework_version\n6.run_config\nInclude a cm-sut-info.json or sut-info.json file with the above content in {result_path}"}
new_res = res

print(f"The SUT folder name for submission generation is: {new_res}")

platform_prefix = inp.get('platform_prefix', '')
if platform_prefix:
Expand Down
2 changes: 1 addition & 1 deletion script/get-mlperf-inference-sut-description/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def preprocess(i):

hw_name = env['CM_HW_NAME']

backend = env.get('CM_MLPERF_BACKEND', '')
backend = env.get('CM_MLPERF_BACKEND', '')
backend_version = env.get('CM_MLPERF_BACKEND_VERSION', '')
sut_suffix = ''
backend_name = ''
Expand Down