Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use the default sut folder name supplied if cm-sut-json is not there #537

Merged
merged 5 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
26 changes: 3 additions & 23 deletions script/generate-mlperf-inference-submission/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,29 +221,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', 'pytorch') # default is set to pytorch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not set the default backend here. It should only be for submission generation step if backend information is not available elsewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @arjunsuresh , updated in commit cf30e25

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