Skip to content

Commit a67a4b9

Browse files
committed
rename some mkldnn tests to onednn
1 parent f9b74fc commit a67a4b9

8 files changed

Lines changed: 29 additions & 22 deletions

File tree

test/cpp/inference/api/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ if(WITH_TESTING AND WITH_INFERENCE_API_TEST)
583583

584584
# Quant2 MobileNetV1
585585
inference_analysis_api_quant_test_run(
586-
test_analyzer_quant2_mobilenetv1_mkldnn
586+
test_analyzer_quant2_mobilenetv1_onednn
587587
${QUANT_IMG_CLASS_TEST_APP}
588588
${QUANT2_MobileNetV1_MODEL_DIR}/MobileNet_qat_perf/float
589589
${QUANT2_MobileNetV1_MODEL_DIR}/MobileNet_qat_perf/float
@@ -604,7 +604,7 @@ if(WITH_TESTING AND WITH_INFERENCE_API_TEST)
604604
set(QUANT2_RESNET50_MODEL
605605
${QUANT2_RESNET50_CHANNELWISE_MODEL_DIR}/ResNet50_qat_channelwise)
606606
inference_analysis_api_quant_test_run(
607-
test_analyzer_quant2_resnet50_channelwise_mkldnn
607+
test_analyzer_quant2_resnet50_channelwise_onednn
608608
${QUANT_IMG_CLASS_TEST_APP} ${QUANT2_RESNET50_MODEL}
609609
${QUANT2_RESNET50_MODEL} ${IMAGENET_DATA_PATH} true)
610610

@@ -1016,9 +1016,9 @@ if(WITH_TESTING AND WITH_INFERENCE_API_TEST)
10161016
if(WITH_ONEDNN)
10171017
set_tests_properties(test_analyzer_quant_performance_benchmark
10181018
PROPERTIES TIMEOUT 120)
1019-
set_tests_properties(test_analyzer_quant2_mobilenetv1_mkldnn
1019+
set_tests_properties(test_analyzer_quant2_mobilenetv1_onednn
10201020
PROPERTIES TIMEOUT 120)
1021-
set_tests_properties(test_analyzer_quant2_resnet50_channelwise_mkldnn
1021+
set_tests_properties(test_analyzer_quant2_resnet50_channelwise_onednn
10221022
PROPERTIES TIMEOUT 120)
10231023
endif()
10241024

test/deprecated/quantization/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function(inference_analysis_python_api_int8_test_custom_warmup_batch_size
3838
${filename})
3939
endfunction()
4040

41-
function(inference_analysis_python_api_int8_test_mkldnn target model_dir
41+
function(inference_analysis_python_api_int8_test_onednn target model_dir
4242
data_path filename)
4343
_inference_analysis_python_api_int8_test(${target} ${model_dir} ${data_path}
4444
${filename} True)
@@ -225,7 +225,7 @@ endif()
225225

226226
# Since the tests for Quant & INT8 comparison support only testing on Linux
227227
# with MKL-DNN, we remove it here to not test it on other systems.
228-
list(REMOVE_ITEM TEST_OPS test_mkldnn_int8_quantization_strategy
228+
list(REMOVE_ITEM TEST_OPS test_onednn_int8_quantization_strategy
229229
quant_int8_image_classification_comparison quant_int8_nlp_comparison)
230230

231231
#TODO(wanghaoshuang): Fix this unittest failed on GCC8.

test/deprecated/quantization/test_quant2_int8_mkldnn_pass_deprecated.py renamed to test/deprecated/quantization/test_quant2_int8_onednn_pass_deprecated.py

File renamed without changes.

test/deprecated/quantization/test_quantization_mkldnn_pass_deprecated.py renamed to test/deprecated/quantization/test_quantization_onednn_pass_deprecated.py

File renamed without changes.

test/ir/inference/test_mkldnn_matmul_elementwise_add_fuse_pass.py renamed to test/ir/inference/test_onednn_matmul_elementwise_add_fuse_pass.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@
1818
import hypothesis.strategies as st
1919
import numpy as np
2020
from auto_scan_test import PassAutoScanTest
21+
from op_test import OpTestTool
2122
from program_config import OpConfig, ProgramConfig, TensorConfig
2223

2324

25+
@OpTestTool.skip_if_not_cpu()
2426
class TestMatmulElementwiseAddOnednnFusePass(PassAutoScanTest):
2527
def sample_program_config(self, draw):
2628
axis = draw(st.sampled_from([-1, 0, 1]))
@@ -84,7 +86,8 @@ def test(self):
8486
)
8587

8688

87-
class TestMatmulElementwiseAddMkldnnFuse1CHWPass(PassAutoScanTest):
89+
@OpTestTool.skip_if_not_cpu()
90+
class TestMatmulElementwiseAddOnednnFuse1CHWPass(PassAutoScanTest):
8891
def sample_program_config(self, draw):
8992
axis = draw(st.sampled_from([-1, 0, 1]))
9093
matmul_as_x = draw(st.booleans())
@@ -147,6 +150,7 @@ def test(self):
147150
)
148151

149152

153+
@OpTestTool.skip_if_not_cpu()
150154
class TestMatmulElementwiseAddExpendResidualPass(PassAutoScanTest):
151155
def sample_program_config(self, draw):
152156
axis = draw(st.sampled_from([0]))

test/quantization/CMakeLists.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function(inference_analysis_python_api_int8_test_custom_warmup_batch_size
3939
${filename})
4040
endfunction()
4141

42-
function(inference_analysis_python_api_int8_test_mkldnn target model_dir
42+
function(inference_analysis_python_api_int8_test_onednn target model_dir
4343
data_path filename)
4444
_inference_analysis_python_api_int8_test(${target} ${model_dir} ${data_path}
4545
${filename} True)
@@ -271,7 +271,7 @@ if(LINUX AND WITH_ONEDNN)
271271
${QUANT_RESNET50_MODEL_DIR} ${QUANT_RESNET50_MODEL_ARCHIVE}
272272
ff89b934ab961c3a4a844193ece2e8a7)
273273
inference_quant_int8_image_classification_test(
274-
test_quant_int8_resnet50_mkldnn ${QUANT_RESNET50_MODEL_DIR}/model
274+
test_quant_int8_resnet50_onednn ${QUANT_RESNET50_MODEL_DIR}/model
275275
${IMAGENET_DATA_PATH})
276276

277277
# Quant ResNet101
@@ -281,7 +281,7 @@ if(LINUX AND WITH_ONEDNN)
281281
${QUANT_RESNET101_MODEL_DIR} ${QUANT_RESNET101_MODEL_ARCHIVE}
282282
95c6d01e3aeba31c13efb2ba8057d558)
283283
# inference_quant_int8_image_classification_test( \
284-
# test_quant_int8_resnet101_mkldnn \
284+
# test_quant_int8_resnet101_onednn \
285285
# ${QUANT_RESNET101_MODEL_DIR}/model \
286286
# ${IMAGENET_DATA_PATH})
287287

@@ -292,7 +292,7 @@ if(LINUX AND WITH_ONEDNN)
292292
${QUANT_GOOGLENET_MODEL_DIR} ${QUANT_GOOGLENET_MODEL_ARCHIVE}
293293
1d4a7383baa63e7d1c423e8db2b791d5)
294294
#inference_quant_int8_image_classification_test(
295-
# test_quant_int8_googlenet_mkldnn ${QUANT_GOOGLENET_MODEL_DIR}/model
295+
# test_quant_int8_googlenet_onednn ${QUANT_GOOGLENET_MODEL_DIR}/model
296296
# ${IMAGENET_DATA_PATH})
297297

298298
# Quant MobileNetV1
@@ -309,7 +309,7 @@ if(LINUX AND WITH_ONEDNN)
309309
${QUANT_MOBILENETV2_MODEL_DIR} ${QUANT_MOBILENETV2_MODEL_ARCHIVE}
310310
758a99d9225d8b73e1a8765883f96cdd)
311311
inference_quant_int8_image_classification_test(
312-
test_quant_int8_mobilenetv2_mkldnn ${QUANT_MOBILENETV2_MODEL_DIR}/model
312+
test_quant_int8_mobilenetv2_onednn ${QUANT_MOBILENETV2_MODEL_DIR}/model
313313
${IMAGENET_DATA_PATH})
314314

315315
# Quant VGG16
@@ -318,7 +318,7 @@ if(LINUX AND WITH_ONEDNN)
318318
download_quant_model(${QUANT_VGG16_MODEL_DIR} ${QUANT_VGG16_MODEL_ARCHIVE}
319319
c37e63ca82a102f47be266f8068b0b55)
320320
# inference_quant_int8_image_classification_test( \
321-
# test_quant_int8_vgg16_mkldnn \
321+
# test_quant_int8_vgg16_onednn \
322322
# ${QUANT_VGG16_MODEL_DIR}/model \
323323
# ${IMAGENET_DATA_PATH})
324324

@@ -328,7 +328,7 @@ if(LINUX AND WITH_ONEDNN)
328328
download_quant_model(${QUANT_VGG19_MODEL_DIR} ${QUANT_VGG19_MODEL_ARCHIVE}
329329
62bcd4b6c3ca2af67e8251d1c96ea18f)
330330
# inference_quant_int8_image_classification_test( \
331-
# test_quant_int8_vgg19_mkldnn ${QUANT_VGG19_MODEL_DIR}/model \
331+
# test_quant_int8_vgg19_onednn ${QUANT_VGG19_MODEL_DIR}/model \
332332
# ${IMAGENET_DATA_PATH})
333333

334334
### Quant2 for image classification
@@ -420,15 +420,15 @@ if(LINUX AND WITH_ONEDNN)
420420
${QUANT2_INT8_LSTM_SAVE_PATH} ${QUANT2_FP32_LSTM_MODEL_ARCHIVE}
421421
eecd9f44d69a84acc1cf2235c4b8b743)
422422
inference_quant2_int8_lstm_model_test(
423-
test_quant2_int8_lstm_mkldnn ${QUANT2_INT8_LSTM_SAVE_PATH}/lstm_fp32_model
423+
test_quant2_int8_lstm_onednn ${QUANT2_INT8_LSTM_SAVE_PATH}/lstm_fp32_model
424424
${QUANT2_LSTM_MODEL_DIR}/lstm_quant
425425
${QUANT2_INT8_LSTM_SAVE_PATH}/quant_lstm_input_data)
426426

427427
endif()
428428

429429
# Since the tests for Quant & INT8 comparison support only testing on Linux
430-
# with MKL-DNN, we remove it here to not test it on other systems.
431-
list(REMOVE_ITEM TEST_OPS test_mkldnn_int8_quantization_strategy
430+
# with One-DNN, we remove it here to not test it on other systems.
431+
list(REMOVE_ITEM TEST_OPS test_onednn_int8_quantization_strategy
432432
quant_int8_image_classification_comparison quant_int8_nlp_comparison)
433433

434434
#TODO(wanghaoshuang): Fix this unittest failed on GCC8.
@@ -477,11 +477,11 @@ set_tests_properties(test_imperative_qat_channelwise PROPERTIES TIMEOUT 200)
477477
set_tests_properties(test_imperative_out_scale PROPERTIES TIMEOUT 200)
478478
set_tests_properties(test_imperative_skip_op PROPERTIES TIMEOUT 300)
479479
if(LINUX AND WITH_ONEDNN)
480-
set_tests_properties(test_quant_int8_mobilenetv2_mkldnn PROPERTIES TIMEOUT
480+
set_tests_properties(test_quant_int8_mobilenetv2_onednn PROPERTIES TIMEOUT
481481
120)
482-
set_tests_properties(test_quant_int8_resnet50_mkldnn PROPERTIES TIMEOUT 120)
483-
#set_tests_properties(test_quant_int8_googlenet_mkldnn PROPERTIES TIMEOUT 120)
484-
set_tests_properties(test_quant2_int8_lstm_mkldnn PROPERTIES TIMEOUT 120)
482+
set_tests_properties(test_quant_int8_resnet50_onednn PROPERTIES TIMEOUT 120)
483+
#set_tests_properties(test_quant_int8_googlenet_onednn PROPERTIES TIMEOUT 120)
484+
set_tests_properties(test_quant2_int8_lstm_onednn PROPERTIES TIMEOUT 120)
485485
endif()
486486

487487
if(APPLE)

tools/get_quick_disable_lt.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ def download_file():
103103
external_xpu = external_xpu + "|" + local_list
104104
disabled_ut_list = disabled_ut_list + "|" + external_xpu
105105

106+
# change mkldnn to onednn tests
107+
disabled_ut_list = disabled_ut_list.replace("_mkldnn", "_onednn")
108+
106109
print(disabled_ut_list)
107110
sys.exit(0)
108111

tools/windows/run_unittests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ disable_wingpu_cuda12_test="^test_cholesky_op$|\
151151
^test_onednn_conv_mish_fuse_pass$|\
152152
^test_onednn_conv_transpose_bias_fuse_pass$|\
153153
^test_onednn_depthwise_conv_pass$|\
154-
^test_mkldnn_matmul_elementwise_add_fuse_pass$|\
154+
^test_onednn_matmul_elementwise_add_fuse_pass$|\
155155
^test_onednn_matmul_v2_elementwise_add_fuse_pass$|\
156156
^test_onednn_matmul_v2_transpose_reshape_fuse_pass$|\
157157
^test_onednn_mish_op$|\

0 commit comments

Comments
 (0)