Skip to content

Commit eae72d8

Browse files
authored
Fix get-sys-utils-min on Windows (#182), SCC24
* use default downloader for windows exe * Fix SCC24 github action
1 parent 6fb67b3 commit eae72d8

File tree

5 files changed

+22
-14
lines changed

5 files changed

+22
-14
lines changed

automation/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ def unzip_file(i):
259259

260260
console = i.get('out') == 'con'
261261

262-
# Attempt to read cmr.json
263262
file_name_handle = open(file_name, 'rb')
264263
file_name_zip = zipfile.ZipFile(file_name_handle)
265264

script/clean-nvidia-mlperf-inference-scratch-space/customize.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ def preprocess(i):
1616

1717
clean_cmd = ''
1818
cache_rm_tags = ''
19-
extra_cache_rm_tags = env.get('MLC_CLEAN_EXTRA_CACHE_RM_TAGS', '')
19+
extra_cache_rm_tags = env.get('MLC_CLEAN_EXTRA_CACHE_RM_TAGS', '').strip()
2020

21+
extra_tags = "," + extra_cache_rm_tags if extra_cache_rm_tags != '' else ''
2122
if env.get('MLC_MODEL', '') == 'sdxl':
2223
if env.get('MLC_CLEAN_ARTIFACT_NAME', '') == 'downloaded_data':
2324
clean_cmd = f"""rm -rf {os.path.join(env['MLC_NVIDIA_MLPERF_SCRATCH_PATH'], "data", "coco", "SDXL")} """
@@ -29,7 +30,7 @@ def preprocess(i):
2930
clean_cmd = f"""rm -rf {os.path.join(env['MLC_NVIDIA_MLPERF_SCRATCH_PATH'], "models", "SDXL")} """
3031
cache_rm_tags = "nvidia-harness,_download_model,_sdxl"
3132

32-
cache_rm_tags = cache_rm_tags + extra_cache_rm_tags
33+
cache_rm_tags = cache_rm_tags + extra_tags
3334
mlc_cache = i['automation'].cache_action
3435

3536
if cache_rm_tags:

script/get-mlperf-inference-sut-configs/configs/RTX4090x2/nvidia_original-implementation/gpu-device/tensorrt-framework/framework-version-default/default-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@
3939
Offline:
4040
target_qps: 1.3
4141
Server:
42-
target_qps: 0.6
42+
target_qps: 0.4

script/get-sys-utils-min/customize.py

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from mlc import utils
22
import os
3+
from utils import download_file, unzip_file
34

45

56
def preprocess(i):
@@ -22,7 +23,7 @@ def preprocess(i):
2223
for cd in clean_dirs.split(','):
2324
if cd != '':
2425
if os.path.isdir(cd):
25-
print('Clearning directory {}'.format(cd))
26+
print('Cleaning directory {}'.format(cd))
2627
shutil.rmtree(cd)
2728

2829
url = env['MLC_PACKAGE_WIN_URL']
@@ -38,16 +39,25 @@ def preprocess(i):
3839

3940
print('')
4041
print('Downloading from {}'.format(url))
41-
env['MLC_DAE_FINAL_ENV_NAME'] = 'FILENAME'
42-
env['MLC_OUTDIRNAME'] = os.getcwd()
43-
r = cm.access({'action': 'run',
44-
'target': 'script',
45-
'env': env,
46-
'tags': 'download-and-extract,_extract',
47-
'url': url})
42+
r = download_file({
43+
'url': url,
44+
'verify': False})
4845
if r['return'] > 0:
4946
return r
5047

48+
filename = r['filename']
49+
50+
print('Unzipping file {}'.format(filename))
51+
52+
r = unzip_file({
53+
'filename': filename})
54+
if r['return'] > 0:
55+
return r
56+
57+
if os.path.isfile(filename):
58+
print('Removing file {}'.format(filename))
59+
os.remove(filename)
60+
5161
print('')
5262

5363
# Add to path

script/install-cmake-prebuilt/customize.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ def preprocess(i):
7171
print('')
7272
print('Downloading from {} ...'.format(package_url))
7373

74-
cm = automation.action_object
75-
7674
r = download_file({
7775
'url': package_url})
7876
if r['return'] > 0:

0 commit comments

Comments
 (0)