Skip to content

Commit

Permalink
Fix scenarios in docs page
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsuresh committed Oct 22, 2024
1 parent 2bf7aac commit 30c0c0b
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
def define_env(env):

@env.macro
def mlperf_inference_implementation_readme(spaces, model, implementation, *, implementation_tips=True, setup_tips=True, run_tips=True, skip_test_query_count=False, scenarios = [], devices=[], frameworks=[], categories=[], extra_variation_tags="", extra_input_string="", extra_docker_input_string=""):
def mlperf_inference_implementation_readme(spaces, model, implementation, *, implementation_tips=True, setup_tips=True, run_tips=True, skip_test_query_count=False, fixed_scenarios = [], devices=[], frameworks=[], categories=[], extra_variation_tags="", extra_input_string="", extra_docker_input_string=""):
pre_space = ""

for i in range(1,spaces):
Expand Down Expand Up @@ -78,7 +78,7 @@ def mlperf_inference_implementation_readme(spaces, model, implementation, *, imp
frameworks = [ "Onnxruntime" ]

elif implementation == "ctuning-cpp":
scenarios = [ "SingleStream" ]
fixed_scenarios = [ "SingleStream" ]
devices = [ "CPU" ]
if model.lower() == "resnet50":
frameworks = [ "TFLite" ]
Expand All @@ -99,13 +99,14 @@ def mlperf_inference_implementation_readme(spaces, model, implementation, *, imp
final_run_mode = "valid" if "short" not in extra_variation_tags else "test"

for category in categories:
if not scenarios:
if category == "Edge" and not scenarios:
scenarios = [ "Offline", "SingleStream" ]
if model.lower() in [ "resnet50", "retinanet" ] and not "MultiStream" in scenarios:#MultiStream was duplicating
scenarios.append("MultiStream")
elif category == "Datacenter":
scenarios = [ "Offline", "Server" ]
if category == "Edge":
scenarios = [ "Offline", "SingleStream" ]
if model.lower() in [ "resnet50", "retinanet" ] and not "MultiStream" in scenarios:#MultiStream was duplicating
scenarios.append("MultiStream")
elif category == "Datacenter":
scenarios = [ "Offline", "Server" ]
if fixed_scenarios:
scenarios = [ scenario for scenario in scenarios if scenario in fixed_scenarios ]

content += f"{pre_space}=== \"{category.lower()}\"\n\n"

Expand Down

0 comments on commit 30c0c0b

Please sign in to comment.