Skip to content

Commit

Permalink
Added dockerinfo for nvidia implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsuresh committed Jun 6, 2024
1 parent 6ad8a0e commit cf0ca4f
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ def mlperf_inference_implementation_readme(spaces, model, implementation):

if "99.9" not in model: #not showing docker command as it is already done for the 99% variant
content += f"{cur_space2}###### Docker Setup Command\n\n"

docker_info = get_docker_info(spaces+12, model, implementation, device)
content += docker_info

test_query_count=get_test_query_count(model, implementation, device)

content += mlperf_inference_run_command(spaces+12, model, implementation, framework.lower(), category.lower(), "Offline", device.lower(), "test", test_query_count, True)
Expand Down Expand Up @@ -125,9 +129,11 @@ def mlperf_inference_implementation_readme(spaces, model, implementation):
content += run_cmd
content += run_suffix

readme_prefix = get_readme_prefix(spaces, model, implementation)

readme_suffix = get_readme_suffix(spaces, model, implementation)

return content + readme_suffix
return readme_prefix + content + readme_suffix

def get_test_query_count(model, implementation, device, num_devices=1):

Expand All @@ -144,6 +150,27 @@ def get_test_query_count(model, implementation, device, num_devices=1):

return p_range

def get_readme_prefix(spaces, model, implementation):
readme_prefix = ""
pre_space=" "
#for i in range(1,spaces):
# pre_space = pre_space + " "
#pre_space += " "

return readme_prefix

def get_docker_info(spaces, model, implementation, device):
info = ""
pre_space=""
for i in range(1,spaces):
pre_space = pre_space + " "
pre_space += " "
#pre_space = " "
if implementation == "nvidia":
info += f"\n{pre_space}!!! tip\n\n"
info+= f"{pre_space} All the Nvidia benchmarks use the same docker container. So, if you have already done the docker setup command for any benchmark, you can skip the docker setup command below and do the Run commands inside the already built docker container.\n\n"
return info

def get_readme_suffix(spaces, model, implementation):
readme_suffix = ""
pre_space=""
Expand Down

0 comments on commit cf0ca4f

Please sign in to comment.