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

Update the docs #1

Merged
merged 29 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5fe4dfd
Add Rclone-Cloudflare download instructions to README.md
nathanw-mlc Feb 21, 2024
8a00168
Add Rclone-Cloudflare download instructiosn to README.md
nathanw-mlc Feb 21, 2024
1b69968
Minor wording edit to README.md
nathanw-mlc Feb 21, 2024
d30a0ca
Add Rclone-Cloudflare download instructions to README.md
nathanw-mlc Feb 21, 2024
48f8bbb
Add Rclone-GDrive download instructions to README.md
nathanw-mlc Feb 21, 2024
0e70449
Add new and old instructions to README.md
nathanw-mlc Feb 21, 2024
ef482c3
Tweak language in README.md
nathanw-mlc Feb 21, 2024
faa0134
Language tweak in README.md
nathanw-mlc Feb 21, 2024
c7945ac
Minor language tweak in README.md
nathanw-mlc Feb 21, 2024
949ff6b
Fix typo in README.md
nathanw-mlc Feb 23, 2024
22d7072
Count error when logging errors: submission_checker.py
arjunsuresh Mar 14, 2024
6f2f14e
Fixes #1648, restrict loadgen uncommitted error message to within the…
arjunsuresh Feb 28, 2024
3361249
Update test-rnnt.yml (#1688)
arjunsuresh May 2, 2024
b747899
Added docs init
arjunsuresh May 2, 2024
c023fc9
Merge branch 'mlcommons:master' into docs
arjunsuresh May 2, 2024
6fe12df
Fix benchmark URLs
arjunsuresh May 3, 2024
949f8f7
Fix links
arjunsuresh May 8, 2024
120aced
Add _full variation to run commands
arjunsuresh May 8, 2024
dccbe1e
Added script flow diagram
arjunsuresh May 13, 2024
6436dea
Merge branch 'mlcommons:master' into docs
arjunsuresh May 13, 2024
c843a08
Added docker setup command for CM, extra run options
arjunsuresh May 17, 2024
664a37a
Added support for docker options in the docs
arjunsuresh May 17, 2024
a97fc5f
Added --quiet to the CM run_cmds in docs
arjunsuresh May 18, 2024
18ff1a8
Fix the test query count for cm commands
arjunsuresh May 21, 2024
ac6d20a
Support ctuning-cpp implementation
arjunsuresh May 31, 2024
6b2264b
Added commands for mobilenet models
arjunsuresh May 31, 2024
9b896a6
Docs cleanup
arjunsuresh May 31, 2024
ce5a0b0
Docs cleanup
arjunsuresh May 31, 2024
69661bb
Fix merge conflicts
arjunsuresh Jun 5, 2024
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
59 changes: 59 additions & 0 deletions docs/benchmarks/image_classification/mobilenets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Image Classification using Mobilenet models

Mobilenet models are not official MLPerf models and so cannot be used for a Closed division MLPerf inference submission. But since they can be run with Imagenet dataset, we are allowed to use them for Open division submission. Only CPU runs are supported now.

## TFLite Backend

=== "Mobilenet-V1"
### Mobilenet V1
```bash
cm run script --tags=run,mobilenet-models,_tflite,_mobilenet-v1 --adr.compiler.tags=gcc
```
=== "Mobilenet-V2"
### Mobilenet V2
```bash
cm run script --tags=run,mobilenet-models,_tflite,_mobilenet-v2 --adr.compiler.tags=gcc
```
=== "Mobilenet-V2"
### Mobilenet V2
```bash
cm run script --tags=run,mobilenet-models,_tflite,_mobilenet-v2 --adr.compiler.tags=gcc
```
=== "Mobilenets"
### Mobilenet V1,V2,V3
```bash
cm run script --tags=run,mobilenet-models,_tflite,_mobilenet --adr.compiler.tags=gcc
```
=== "Efficientnet"
### Efficientnet
```bash
cm run script --tags=run,mobilenet-models,_tflite,_efficientnet --adr.compiler.tags=gcc
```

## ARMNN Backend
=== "Mobilenet-V1"
### Mobilenet V1
```bash
cm run script --tags=run,mobilenet-models,_tflite,_armnn,_mobilenet-v1 --adr.compiler.tags=gcc
```
=== "Mobilenet-V2"
### Mobilenet V2
```bash
cm run script --tags=run,mobilenet-models,_tflite,_armnn,_mobilenet-v2 --adr.compiler.tags=gcc
```
=== "Mobilenet-V2"
### Mobilenet V2
```bash
cm run script --tags=run,mobilenet-models,_tflite,_armnn,_mobilenet-v2 --adr.compiler.tags=gcc
```
=== "Mobilenets"
### Mobilenet V1,V2,V3
```bash
cm run script --tags=run,mobilenet-models,_tflite,_armnn,_mobilenet --adr.compiler.tags=gcc
```
=== "Efficientnet"
### Efficientnet
```bash
cm run script --tags=run,mobilenet-models,_tflite,_armnn,_efficientnet --adr.compiler.tags=gcc
```

2 changes: 2 additions & 0 deletions docs/benchmarks/image_classification/resnet50.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,5 @@ Get the Official MLPerf ResNet50 Model
### MLPerf Modular Implementation in C++

{{ mlperf_inference_implementation_readme (4, "resnet50", "cpp") }}

Please see [mobilenets.md](mobilenets.md) for running mobilenet models for Image Classification.
2 changes: 0 additions & 2 deletions docs/benchmarks/text_to_image/sdxl.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,11 @@ Get the Official MLPerf Stable Diffusion Model

=== "Intel"
### Intel MLPerf Implementation
GPTJ-99
{{ mlperf_inference_implementation_readme (4, "sdxl", "intel") }}


=== "Qualcomm"
### Qualcomm AI100 MLPerf Implementation

GPTJ-99
{{ mlperf_inference_implementation_readme (4, "sdxl", "qualcomm") }}

2 changes: 1 addition & 1 deletion docs/submission/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
If you follow the `cm run` commands under the individual model pages in the [benchmarks](../benchmarks) directory, all the valid results will get aggregated to the `cm cache` folder. Once all the results across all the modelsare ready you can use the following command to generate a valid submission tree compliant with the [MLPerf requirements](https://github.com/mlcommons/policies/blob/master/submission_rules.adoc#inference-1).
If you follow the `cm run` commands under the individual model pages in the [benchmarks](../benchmarks/index.md) directory, all the valid results will get aggregated to the `cm cache` folder. Once all the results across all the modelsare ready you can use the following command to generate a valid submission tree compliant with the [MLPerf requirements](https://github.com/mlcommons/policies/blob/master/submission_rules.adoc#inference-1).

## Generate actual submission tree

Expand Down
34 changes: 30 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def mlperf_inference_implementation_readme(spaces, model, implementation):
pre_space += " "

content=""
scenarios = []
if implementation == "reference":
devices = [ "CPU", "CUDA", "ROCm" ]
if model.lower() == "resnet50":
Expand All @@ -23,6 +24,8 @@ def mlperf_inference_implementation_readme(spaces, model, implementation):
devices = [ "CUDA" ]
frameworks = [ "TensorRT" ]
elif implementation == "intel":
if model not in [ "bert-99", "bert-99.9", "gptj-99", "gptj-99.9" ]:
return pre_space+" WIP"
devices = [ "CPU" ]
frameworks = [ "Pytorch" ]
elif implementation == "qualcomm":
Expand All @@ -31,6 +34,13 @@ def mlperf_inference_implementation_readme(spaces, model, implementation):
elif implementation == "cpp":
devices = [ "CPU", "CUDA" ]
frameworks = [ "Onnxruntime" ]
elif implementation == "ctuning-cpp":
scenarios = [ "SingleStream" ]
devices = [ "CPU" ]
if model.lower() == "resnet50":
frameworks = [ "TFLite" ]
else:
frameworks = []

if model.lower() == "bert-99.9":
categories = [ "Datacenter" ]
Expand All @@ -40,11 +50,11 @@ def mlperf_inference_implementation_readme(spaces, model, implementation):
categories = [ "Edge", "Datacenter" ]

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

content += f"{pre_space}=== \"{category.lower()}\"\n\n"
Expand All @@ -69,7 +79,8 @@ def mlperf_inference_implementation_readme(spaces, model, implementation):
content += f"{cur_space2}###### {device} device\n\n"

content += f"{cur_space2}###### Docker Setup Command\n\n"
test_query_count=100
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)
content += f"{cur_space2}The above command should get you to an interactive shell inside the docker container and do a quick test run for the Offline scenario. Once inside the docker container please do the below commands to do the accuracy + performance runs for each scenario.\n\n"
content += f"{cur_space2}<details>\n"
Expand Down Expand Up @@ -101,6 +112,21 @@ def mlperf_inference_implementation_readme(spaces, model, implementation):

return content

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

if model == "resnet50":
p_range = 1000
elif model in [ "retinanet", "bert-99", "bert-99.9" ]:
p_range = 100
else:
p_range = 50
if device == "cuda":
p_range *= 40
p_range *= num_devices

return p_range



@env.macro
def mlperf_inference_run_command(spaces, model, implementation, framework, category, scenario, device="cpu", execution_mode="test", test_query_count="20", docker=False):
Expand Down
Loading