Skip to content

Commit f8e76e5

Browse files
authored
Code cleanup for mobilenet runs
* Added alternative download link for imagenet-aux * Clean-up install-python-src meta * Update mobilenet docker meta * Update meta.yaml * Fix intercative for mobilenet docker * Removed mlc import in mobilenet-models * Added print for rm cache in mlperf-inference-mobilenet-models
1 parent 1879acd commit f8e76e5

File tree

4 files changed

+34
-18
lines changed

4 files changed

+34
-18
lines changed

.github/workflows/build_wheel.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
paths:
1111
- VERSION
1212

13+
1314
jobs:
1415

1516
build_wheels:

script/install-python-src/meta.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ deps:
2020
MLC_HOST_OS_FLAVOR:
2121
- ubuntu
2222
- tags: get,generic-sys-util,_libssl-dev
23+
enable_if_env:
24+
MLC_ENABLE_SSL:
25+
- 'yes'
2326
- enable_if_env:
2427
MLC_HOST_OS_FLAVOR:
2528
- ubuntu
@@ -84,3 +87,4 @@ variations:
8487
MLC_ENABLE_SSL: 'yes'
8588
MLC_PYTHON_INSTALL_CACHE_TAGS: with-ssl
8689
group: ssl
90+
default: true

script/run-mlperf-inference-mobilenet-models/customize.py

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from mlc import utils
22
import os
3-
import mlc
43
import sys
4+
from utils import *
55

66

77
def preprocess(i):
@@ -122,10 +122,18 @@ def preprocess(i):
122122
implementation_tags_string = ",".join(implementation_tags)
123123

124124
inp = i['input']
125+
clean_input = {
126+
'action': 'rm',
127+
'target': 'cache',
128+
'tags': 'get,preprocessed,dataset,_for.mobilenet',
129+
'quiet': True,
130+
'v': verbose,
131+
'f': True
132+
}
125133

126-
for model in variation_strings:
127-
for v in variation_strings[model]:
128-
for precision in precisions:
134+
for precision in precisions:
135+
for model in variation_strings:
136+
for v in variation_strings[model]:
129137

130138
if "small-minimalistic" in v and precision == "uint8":
131139
continue
@@ -195,17 +203,16 @@ def preprocess(i):
195203
if env.get('MLC_TEST_ONE_RUN', '') == "yes":
196204
return {'return': 0}
197205

198-
clean_input = {
199-
'action': 'rm',
200-
'automation': 'cache',
201-
'tags': 'get,preprocessed,dataset,_for.mobilenet',
202-
'quiet': True,
203-
'v': verbose,
204-
'f': True
205-
}
206-
r = mlc.access(clean_input)
207-
# if r['return'] > 0:
208-
# return r
206+
if is_true(env.get('MLC_MINIMIZE_DISK_SPACE', '')):
207+
r = mlc.access(clean_input)
208+
if r['return'] > 0:
209+
print(r)
210+
# return r
211+
212+
r = mlc.access(clean_input)
213+
if r['return'] > 0:
214+
print(r)
215+
# return r
209216
return {'return': 0}
210217

211218

script/run-mlperf-inference-mobilenet-models/meta.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,20 @@ docker:
3434
imagenet_path: MLC_DATASET_IMAGENET_PATH
3535
results_dir: MLC_MLPERF_INFERENCE_RESULTS_DIR
3636
submission_dir: MLC_MLPERF_INFERENCE_SUBMISSION_DIR
37-
docker_run_final_cmds:
38-
- mlcr run,mlperf,inference,mobilenet-models,_find-performance --adr.mlperf-inference-implementation.fake_run=True --adr.compiler.tags=gcc
3937
fake_run_deps: false
38+
pre_run_cmds:
39+
- mlc pull repo
4040
mounts:
4141
- "${{ MLC_DATASET_IMAGENET_PATH }}:${{ MLC_DATASET_IMAGENET_PATH }}"
4242
- "${{ MLC_MLPERF_INFERENCE_RESULTS_DIR }}:${{ MLC_MLPERF_INFERENCE_RESULTS_DIR }}"
4343
- "${{ OUTPUT_BASE_DIR }}:${{ OUTPUT_BASE_DIR }}"
4444
- "${{ MLC_MLPERF_INFERENCE_SUBMISSION_DIR }}:${{ MLC_MLPERF_INFERENCE_SUBMISSION_DIR }}"
4545
run: true
46-
docker_it: true
46+
interactive: true
47+
mlc_repo: mlcommons@mlperf-automations
48+
mlc_repo_branch: dev
49+
real_run: False
50+
os_version: '22.04'
4751
input_mapping:
4852
find-performance: MLC_MLPERF_FIND_PERFORMANCE_MODE
4953
imagenet_path: IMAGENET_PATH

0 commit comments

Comments
 (0)