@@ -308,17 +308,87 @@ if(WITH_GPU AND TENSORRT_FOUND)
308
308
endif ()
309
309
endif ()
310
310
311
+ if (WIN32 AND WIN_UNITTEST_LEVEL LESS 2 )
312
+ message (STATUS "Skip tests unrelated to CUDA/TRT" )
313
+ elseif (WITH_ONEDNN )
314
+
315
+ set (PIR_COVERAGE_MKLDNN_TESTS
316
+ test_mkldnn_conv_affine_channel_fuse_pass
317
+ test_mkldnn_conv_gelu_fuse_pass
318
+ test_mkldnn_conv_hard_sigmoid_fuse_pass
319
+ test_mkldnn_conv_hard_swish_fuse_pass
320
+ test_mkldnn_conv_mish_fuse_pass
321
+ test_mkldnn_conv_transpose_bias_fuse_pass
322
+ test_mkldnn_conv3d_op
323
+ test_mkldnn_depthwise_conv_pass
324
+ test_mkldnn_shape_op
325
+ test_mkldnn_shuffle_channel_op )
326
+ foreach (target ${PIR_COVERAGE_MKLDNN_TESTS} )
327
+ py_test_modules (${target} _pir MODULES ${target} ENVS FLAGS_enable_pir_api=1 )
328
+ set_tests_properties (${target} PROPERTIES LABELS "RUN_TYPE=INFER" )
329
+ message (STATUS "PIR Copied Test: ${target} _pir in inference test" )
330
+ endforeach ()
331
+
332
+ set (PIR_COVERAGE_ONEDNN_TESTS
333
+ test_onednn_batch_norm_act_fuse_pass
334
+ test_onednn_conv_bias_fuse_pass
335
+ test_onednn_conv_bn_fuse_pass
336
+ test_onednn_conv_concat_activation_fuse_pass
337
+ test_onednn_conv_elementwise_add_fuse_pass
338
+ test_onednn_elementwise_add_activation_fuse_pass
339
+ test_onednn_fc_activation_fuse_pass
340
+ test_onednn_fc_gru_fuse_pass
341
+ test_onednn_fc_lstm_fuse_pass )
342
+ foreach (target ${PIR_COVERAGE_ONEDNN_TESTS} )
343
+ py_test_modules (${target} _pir MODULES ${target} ENVS FLAGS_enable_pir_api=1 )
344
+ set_tests_properties (${target} PROPERTIES LABELS "RUN_TYPE=INFER" )
345
+ message (STATUS "PIR Copied Test: ${target} _pir in inference test" )
346
+ endforeach ()
347
+
348
+ set_tests_properties (test_mkldnn_shape_op_pir PROPERTIES TIMEOUT 300 )
349
+ set_tests_properties (test_mkldnn_shuffle_channel_op_pir PROPERTIES TIMEOUT
350
+ 300 )
351
+ set_tests_properties (test_onednn_conv_bias_fuse_pass_pir PROPERTIES TIMEOUT
352
+ 300 )
353
+ set_tests_properties (test_onednn_conv_concat_activation_fuse_pass_pir
354
+ PROPERTIES TIMEOUT 300 )
355
+
356
+ endif ()
357
+
311
358
if (WITH_GPU AND TENSORRT_FOUND )
312
359
if (WITH_ONEDNN )
313
360
py_test_modules (test_matmul_scale_fuse_pass_pir MODULES
314
361
test_matmul_scale_fuse_pass ENVS FLAGS_enable_pir_api=1 )
362
+ py_test_modules (
363
+ test_multihead_matmul_fuse_pass_v3_pir MODULES
364
+ test_multihead_matmul_fuse_pass_v3 ENVS FLAGS_enable_pir_api=1 )
365
+ py_test_modules (
366
+ test_multihead_matmul_roformer_fuse_pass_pir MODULES
367
+ test_multihead_matmul_roformer_fuse_pass ENVS FLAGS_enable_pir_api=1 )
368
+ py_test_modules (test_matmul_v2_scale_fuse_pass_pir MODULES
369
+ test_matmul_v2_scale_fuse_pass ENVS FLAGS_enable_pir_api=1 )
370
+ set_tests_properties (test_multihead_matmul_fuse_pass_v3_pir
371
+ PROPERTIES LABELS "RUN_TYPE=INFER" )
372
+ set_tests_properties (test_multihead_matmul_roformer_fuse_pass_pir
373
+ PROPERTIES LABELS "RUN_TYPE=INFER" )
374
+ set_tests_properties (test_multihead_matmul_fuse_pass_v3_pir
375
+ PROPERTIES TIMEOUT 300 )
376
+ set_tests_properties (test_multihead_matmul_roformer_fuse_pass_pir
377
+ PROPERTIES TIMEOUT 300 )
378
+
315
379
if (WIN32 )
316
380
set_tests_properties (test_matmul_scale_fuse_pass_pir PROPERTIES TIMEOUT
317
381
300 )
382
+ set_tests_properties (test_matmul_v2_scale_fuse_pass_pir PROPERTIES TIMEOUT
383
+ 300 )
384
+
385
+ if (WIN_UNITTEST_LEVEL EQUAL 2 )
386
+ set_tests_properties (test_onednn_conv_bias_fuse_pass_pir
387
+ PROPERTIES TIMEOUT 600 )
388
+ set_tests_properties (test_onednn_conv_concat_activation_fuse_pass_pir
389
+ PROPERTIES TIMEOUT 600 )
390
+ endif ()
318
391
else ()
319
- py_test_modules (
320
- test_matmul_v2_scale_fuse_pass_pir MODULES
321
- test_matmul_v2_scale_fuse_pass ENVS FLAGS_enable_pir_api=1 )
322
392
set_tests_properties (test_matmul_scale_fuse_pass_pir PROPERTIES TIMEOUT
323
393
60 )
324
394
set_tests_properties (test_matmul_v2_scale_fuse_pass_pir PROPERTIES TIMEOUT
@@ -327,21 +397,6 @@ if(WITH_GPU AND TENSORRT_FOUND)
327
397
if (WIN32 AND WIN_UNITTEST_LEVEL LESS 2 )
328
398
message (STATUS "Skip tests unrelated to CUDA/TRT" )
329
399
else ()
330
- set (PIR_COVERAGE_MKLDNN_TESTS
331
- test_mkldnn_conv_affine_channel_fuse_pass
332
- test_mkldnn_conv_gelu_fuse_pass
333
- test_mkldnn_conv_hard_sigmoid_fuse_pass
334
- test_mkldnn_conv_hard_swish_fuse_pass
335
- test_mkldnn_conv_mish_fuse_pass
336
- test_mkldnn_conv_transpose_bias_fuse_pass
337
- test_mkldnn_conv3d_op
338
- test_mkldnn_depthwise_conv_pass )
339
- foreach (target ${PIR_COVERAGE_MKLDNN_TESTS} )
340
- py_test_modules (${target} _pir MODULES ${target} ENVS
341
- FLAGS_enable_pir_api=1 )
342
- set_tests_properties (${target} PROPERTIES LABELS "RUN_TYPE=INFER" )
343
- message (STATUS "PIR Copied Test: ${target} _pir in inference test" )
344
- endforeach ()
345
400
346
401
set_tests_properties (test_mkldnn_conv_affine_channel_fuse_pass_pir
347
402
PROPERTIES TIMEOUT 120 )
@@ -358,6 +413,21 @@ if(WITH_GPU AND TENSORRT_FOUND)
358
413
set_tests_properties (test_mkldnn_conv3d_op_pir PROPERTIES TIMEOUT 300 )
359
414
set_tests_properties (test_mkldnn_depthwise_conv_pass_pir
360
415
PROPERTIES TIMEOUT 120 )
416
+
417
+ set_tests_properties (test_onednn_conv_bn_fuse_pass_pir PROPERTIES TIMEOUT
418
+ 120 )
419
+ set_tests_properties (test_onednn_conv_elementwise_add_fuse_pass_pir
420
+ PROPERTIES TIMEOUT 120 )
421
+ set_tests_properties (test_onednn_batch_norm_act_fuse_pass_pir
422
+ PROPERTIES TIMEOUT 100 )
423
+ set_tests_properties (test_onednn_fc_activation_fuse_pass_pir
424
+ PROPERTIES TIMEOUT 300 )
425
+ set_tests_properties (test_onednn_elementwise_add_activation_fuse_pass_pir
426
+ PROPERTIES TIMEOUT 300 )
427
+ set_tests_properties (test_onednn_fc_gru_fuse_pass_pir PROPERTIES TIMEOUT
428
+ 300 )
429
+ set_tests_properties (test_onednn_fc_lstm_fuse_pass_pir PROPERTIES TIMEOUT
430
+ 300 )
361
431
endif ()
362
432
endif ()
363
433
endif ()
0 commit comments