diff --git a/paddle/fluid/inference/api/analysis_predictor_tester.cc b/paddle/fluid/inference/api/analysis_predictor_tester.cc index 67c9b441e261936b6ede9fa76e825bc853b8df5a..f6c66c2b003609a8a897b37c776863a23407bbee 100644 --- a/paddle/fluid/inference/api/analysis_predictor_tester.cc +++ b/paddle/fluid/inference/api/analysis_predictor_tester.cc @@ -21,6 +21,7 @@ #include "paddle/fluid/inference/api/helper.h" #include "paddle/fluid/inference/api/paddle_inference_api.h" #include "paddle/fluid/inference/tests/api/tester_helper.h" +#include "paddle/fluid/platform/cpu_info.h" #ifdef PADDLE_WITH_MKLDNN #include "paddle/fluid/inference/api/mkldnn_quantizer.h" #endif @@ -493,7 +494,10 @@ TEST(AnalysisPredictor, bf16_gpu_pass_strategy) { config.EnableUseGpu(100, 0); config.EnableMkldnnBfloat16(); #ifdef PADDLE_WITH_MKLDNN - ASSERT_EQ(config.mkldnn_bfloat16_enabled(), true); + if (platform::MayIUse(platform::cpu_isa_t::avx512_core)) + ASSERT_EQ(config.mkldnn_bfloat16_enabled(), true); + else + ASSERT_EQ(config.mkldnn_bfloat16_enabled(), false); #else ASSERT_EQ(config.mkldnn_bfloat16_enabled(), false); #endif diff --git a/tools/windows/run_unittests.sh b/tools/windows/run_unittests.sh index 9a482318264b1487532458607958fcf55f1bc351..1471436cafd0133bebb1ba1b1d19ab36fc79f985 100644 --- a/tools/windows/run_unittests.sh +++ b/tools/windows/run_unittests.sh @@ -37,8 +37,7 @@ fi # /*==================Fixed Disabled Windows unittests==============================*/ # TODO: fix these unittest that is bound to fail -diable_wingpu_test="^test_analysis_predictor$|\ -^test_gradient_clip$|\ +diable_wingpu_test="^test_gradient_clip$|\ ^test_translated_layer$|\ ^test_imperative_resnet$|\ ^test_imperative_resnet_sorted_gradient$|\