Skip to content

Commit c4f3106

Browse files
authored
various updates (#1124)
2 parents 3836164 + 6956962 commit c4f3106

File tree

43 files changed

+626
-104
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+626
-104
lines changed

cm-mlops/automation/script/module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1940,7 +1940,7 @@ def _get_variation_tags_from_default_variations(self, variation_meta, variations
19401940
if tag_to_append not in variations:
19411941
variation_tag_static = self._get_name_for_dynamic_variation_tag(tag_to_append)
19421942
if not variation_tag_static or variation_tag_static not in variations:
1943-
return {'return': 1, 'error': 'Invalid variation "{}" specified in default variations for the variation "{}" '.format(tag_to_append, variation_name)}
1943+
return {'return': 1, 'error': 'Invalid variation "{}" specified in default variations for the variation "{}" '.format(tag_to_append, variation_meta)}
19441944
tmp_variation_tags.append(tag_to_append)
19451945

19461946
return {'return': 0, 'variations_to_add': tmp_variation_tags}

cm-mlops/script/app-mlperf-inference-reference/_cm.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ prehook_deps:
563563
- remote-run-cmds
564564
tags: remote,run,cmds
565565
enable_if_env:
566-
CM_SSH_RUN_COMMANDS:
566+
CM_ASSH_RUN_COMMANDS:
567567
- "on"
568568

569569
posthook_deps:

cm-mlops/script/app-mlperf-inference/_cm.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ variations:
328328

329329
kilt,qualcomm,bert-99.9:
330330
default_variations:
331-
precision: fp16
331+
precision: float16
332332

333333
resnet50:
334334
group:

cm-mlops/script/benchmark-any-mlperf-inference-implementation/_cm.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,3 +291,27 @@ variations:
291291
glow:
292292
offline_target_qps: 350
293293
server_target_qps: 300
294+
rb6:
295+
group: sut
296+
default_env:
297+
CATEGORY: edge
298+
DIVISION: closed
299+
default_variations:
300+
implementation: qualcomm
301+
302+
rb6,qualcomm:
303+
default_env:
304+
EXTRA_ARGS: " --adr.mlperf-inference-implementation.tags=_rb6 --env.CM_MLPERF_SHORT_RANGING_RUN=no"
305+
state:
306+
resnet50:
307+
qaic:
308+
glow:
309+
offline_target_qps: 6800
310+
retinanet:
311+
qaic:
312+
glow:
313+
offline_target_qps: 125
314+
bert-99:
315+
qaic:
316+
glow:
317+
offline_target_qps: 255

cm-mlops/script/calibrate-model-for.qaic/_cm.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
"variations": {
7575
"bs.1": {
7676
"group": "batch-size",
77-
"default": true,
7877
"env": {
7978
"CM_QAIC_MODEL_BATCH_SIZE": "1",
8079
"CM_CREATE_INPUT_BATCH": "yes"

cm-mlops/script/compile-model-for.qaic/_cm.json

Lines changed: 52 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"cache": true,
66
"category": "AI/ML optimization",
77
"new_env_keys": [
8-
"CM_QAIC_*",
8+
"CM_QAIC_MODEL*",
99
"CM_ML_MODEL_FILE_WITH_PATH"
1010
],
1111
"input_mapping": {
@@ -204,7 +204,8 @@
204204
},
205205
"resnet50,multistream": {
206206
"env": {
207-
"CM_QAIC_MODEL_COMPILER_ARGS": ""
207+
"CM_QAIC_MODEL_COMPILER_ARGS": "",
208+
"CM_QAIC_MODEL_COMPILER_ARGS_SUT": "-aic-num-cores=4 -mos=1 -ols=1"
208209
}
209210
},
210211
"resnet50,server": {
@@ -214,13 +215,13 @@
214215
"bert-99": {
215216
"adr": {
216217
"model-src": {
217-
"tags": "bert-large,_onnx"
218+
"tags": "bert-large,_onnx,_packed"
218219
}
219220
},
220221
"env": {
221222
"CM_COMPILE_BERT": "on",
222223
"CM_QAIC_MODEL_TO_CONVERT": "calibrate_bert_mlperf",
223-
"CM_QAIC_MODEL_COMPILER_PARAMS_BASE": "-aic-hw -aic-hw-version=2.0 -execute-nodes-in-fp16=Mul,Sqrt,Div,Add,ReduceMean,Softmax,Sub,Gather,Erf,Pow,Concat,Tile,LayerNormalization -quantization-schema=symmetric_with_uint8 -quantization-precision=Int8 -quantization-precision-bias=Int32 -vvv -compile-only -onnx-define-symbol=batch_size,1 -onnx-define-symbol=seg_length,384 -multicast-weights -combine-inputs=false -combine-outputs=false",
224+
"CM_QAIC_MODEL_COMPILER_PARAMS_BASE": "-aic-hw -aic-hw-version=2.0 -execute-nodes-in-fp16=Add,Div,Erf,Softmax -quantization-schema=symmetric_with_uint8 -quantization-precision=Int8 -quantization-precision-bias=Int32 -vvv -compile-only -onnx-define-symbol=batch_size,1 -onnx-define-symbol=seg_length,384 -multicast-weights -combine-inputs=false -combine-outputs=false",
224225
"CM_QAIC_MODEL_COMPILER_ARGS": ""
225226
},
226227
"deps": [
@@ -236,7 +237,12 @@
236237
"bert-99,offline": {
237238
"env": {
238239
"CM_QAIC_MODEL_COMPILER_ARGS": "-allocator-dealloc-delay=2 -size-split-granularity=1536 -vtcm-working-set-limit-ratio=1",
239-
"CM_QAIC_MODEL_COMPILER_ARGS_SUT": "-aic-num-cores=1 -mos=1 -ols=3"
240+
"CM_QAIC_MODEL_COMPILER_ARGS_SUT": "-aic-num-cores=1 -mos=1 -ols=2"
241+
}
242+
},
243+
"bert-99,offline,nsp.16": {
244+
"env": {
245+
"CM_QAIC_MODEL_COMPILER_ARGS_SUT": "-aic-num-cores=1 -mos=1 -ols=2"
240246
}
241247
},
242248
"bert-99,offline,nsp.14": {
@@ -266,6 +272,47 @@
266272
"CM_QAIC_MODEL_COMPILER_ARGS_SUT": "-aic-num-cores=8 -mos=8 -ols=1"
267273
}
268274
},
275+
"bert-99.9": {
276+
"base": [
277+
"no-quantized"
278+
],
279+
"adr": {
280+
"model-src": {
281+
"tags": "bert-large,_onnx,_packed"
282+
}
283+
},
284+
"env": {
285+
"CM_COMPILE_BERT": "on",
286+
"CM_QAIC_MODEL_TO_CONVERT": "bert_mlperf",
287+
"CM_QAIC_MODEL_COMPILER_PARAMS_BASE": "-aic-hw -aic-hw-version=2.0 -convert-to-fp16 -vvv -compile-only -onnx-define-symbol=batch_size,1 -onnx-define-symbol=seg_length,384 -combine-inputs=false -combine-outputs=false",
288+
"CM_QAIC_MODEL_COMPILER_ARGS": ""
289+
}
290+
},
291+
"bert-99.9,offline": {
292+
"env": {
293+
"CM_QAIC_MODEL_COMPILER_ARGS_SUT": "-aic-num-cores=2 -mos=1 -ols=2"
294+
}
295+
},
296+
"bert-99.9,offline,nsp.16": {
297+
"env": {
298+
"CM_QAIC_MODEL_COMPILER_ARGS_SUT": "-aic-num-cores=2 -mos=1 -ols=2"
299+
}
300+
},
301+
"bert-99.9,offline,nsp.14": {
302+
"env": {
303+
"CM_QAIC_MODEL_COMPILER_ARGS_SUT": "-aic-num-cores=2 -mos=1 -ols=2"
304+
}
305+
},
306+
"bert-99.9,server": {
307+
"env": {
308+
"CM_QAIC_MODEL_COMPILER_ARGS_SUT": "-aic-num-cores=4"
309+
}
310+
},
311+
"bert-99.9,server,nsp.14": {
312+
"env": {
313+
"CM_QAIC_MODEL_COMPILER_ARGS_SUT": "-aic-num-cores=4"
314+
}
315+
},
269316
"tf": {
270317
"group": "model-framework"
271318
},

cm-mlops/script/compile-model-for.qaic/customize.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ def preprocess(i):
2222

2323
print("Compiling from "+ os.getcwd())
2424

25+
env['CM_QAIC_MODEL_FINAL_COMPILATION_CMD'] = cmd
26+
2527
env['CM_RUN_CMD'] = cmd
2628
else:
2729
import shutil

cm-mlops/script/compile-model-for.qaic/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ function run() {
2424
}
2525

2626
#Add your run commands here...
27-
#run "rm -rf elfs"
27+
run "rm -rf elfs"
2828
run "$CM_RUN_CMD"

cm-mlops/script/compile-program/customize.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ def preprocess(i):
1616
env['CM_F_INCLUDE_PATH'] = " -I".join([" "] + env.get('+F_INCLUDE_PATH', []) + CPATH)
1717

1818
# If windows, need to extend it more ...
19-
if os_info['platform'] == 'windows':
19+
if os_info['platform'] == 'windows' and env.get('CM_COMPILER_FAMILY','')!='LLVM':
20+
print ("WARNING: compile-program script should be extended to support flags for non-LLVM compilers on Windows")
2021
return {'return':0}
2122

2223
LDFLAGS = env.get('+ LDFLAGS', [])

cm-mlops/script/compile-program/run.bat

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ cd %CM_SOURCE_FOLDER_PATH%
2222
IF %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%
2323

2424
if not "%CM_C_SOURCE_FILES%" == "" (
25-
echo %CM_C_COMPILER_WITH_PATH% %CM_C_COMPILER_FLAGS% %CM_C_INCLUDE_PATH% %CM_C_SOURCE_FILES% %CM_C_COMPILER_FLAG_OUTPUT%"%RUN_DIR%\%BIN_NAME%"
26-
"%CM_C_COMPILER_WITH_PATH%" %CM_C_COMPILER_FLAGS% %CM_C_INCLUDE_PATH% %CM_C_SOURCE_FILES% %CM_C_COMPILER_FLAG_OUTPUT%"%RUN_DIR%\%BIN_NAME%"
25+
echo %CM_C_COMPILER_WITH_PATH% %CM_C_COMPILER_FLAGS% %CM_C_INCLUDE_PATH% %CM_C_SOURCE_FILES% %CM_LD_LIBRARY_PATH% %LDCFLAGS% %CM_C_COMPILER_FLAG_OUTPUT%"%RUN_DIR%\%BIN_NAME%"
26+
"%CM_C_COMPILER_WITH_PATH%" %CM_C_COMPILER_FLAGS% %CM_C_INCLUDE_PATH% %CM_C_SOURCE_FILES% %CM_LD_LIBRARY_PATH% %LDCFLAGS% %CM_C_COMPILER_FLAG_OUTPUT%"%RUN_DIR%\%BIN_NAME%"
2727
IF %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%
2828
)
2929

3030
if not "%CM_CXX_SOURCE_FILES%" == "" (
31-
echo %CM_CXX_COMPILER_WITH_PATH% %CM_CXX_COMPILER_FLAGS% %CM_CXX_INCLUDE_PATH% %CM_CXX_SOURCE_FILES% %CM_CXX_COMPILER_FLAG_OUTPUT%"%RUN_DIR%\%BIN_NAME%"
32-
"%CM_CXX_COMPILER_WITH_PATH%" %CM_CXX_COMPILER_FLAGS% %CM_CXX_INCLUDE_PATH% %CM_CXX_SOURCE_FILES% %CM_CXX_COMPILER_FLAG_OUTPUT%"%RUN_DIR%\%BIN_NAME%"
31+
echo %CM_CXX_COMPILER_WITH_PATH% %CM_CXX_SOURCE_FILES% %CM_CXX_COMPILER_FLAGS% %CM_CPLUS_INCLUDE_PATH% %CM_LD_LIBRARY_PATH% %LDCXXFLAGS% %CM_CXX_COMPILER_FLAG_OUTPUT%"%RUN_DIR%\%BIN_NAME%"
32+
"%CM_CXX_COMPILER_WITH_PATH%" %CM_CXX_SOURCE_FILES% %CM_CXX_COMPILER_FLAGS% %CM_CPLUS_INCLUDE_PATH% %CM_LD_LIBRARY_PATH% %LDCXXFLAGS% %CM_CXX_COMPILER_FLAG_OUTPUT%"%RUN_DIR%\%BIN_NAME%"
3333
IF %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%
3434
)
3535

0 commit comments

Comments
 (0)