未验证 提交 907262ee 编写于 作者: J joanna.wozna.intel 提交者: GitHub

Fix analysis predictor test (#30191)

* Add a necessary condition

* Remove test for white list and add header
上级 2dc7ee27
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "paddle/fluid/inference/api/helper.h" #include "paddle/fluid/inference/api/helper.h"
#include "paddle/fluid/inference/api/paddle_inference_api.h" #include "paddle/fluid/inference/api/paddle_inference_api.h"
#include "paddle/fluid/inference/tests/api/tester_helper.h" #include "paddle/fluid/inference/tests/api/tester_helper.h"
#include "paddle/fluid/platform/cpu_info.h"
#ifdef PADDLE_WITH_MKLDNN #ifdef PADDLE_WITH_MKLDNN
#include "paddle/fluid/inference/api/mkldnn_quantizer.h" #include "paddle/fluid/inference/api/mkldnn_quantizer.h"
#endif #endif
...@@ -493,7 +494,10 @@ TEST(AnalysisPredictor, bf16_gpu_pass_strategy) { ...@@ -493,7 +494,10 @@ TEST(AnalysisPredictor, bf16_gpu_pass_strategy) {
config.EnableUseGpu(100, 0); config.EnableUseGpu(100, 0);
config.EnableMkldnnBfloat16(); config.EnableMkldnnBfloat16();
#ifdef PADDLE_WITH_MKLDNN #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 #else
ASSERT_EQ(config.mkldnn_bfloat16_enabled(), false); ASSERT_EQ(config.mkldnn_bfloat16_enabled(), false);
#endif #endif
......
...@@ -37,8 +37,7 @@ fi ...@@ -37,8 +37,7 @@ fi
# /*==================Fixed Disabled Windows unittests==============================*/ # /*==================Fixed Disabled Windows unittests==============================*/
# TODO: fix these unittest that is bound to fail # TODO: fix these unittest that is bound to fail
diable_wingpu_test="^test_analysis_predictor$|\ diable_wingpu_test="^test_gradient_clip$|\
^test_gradient_clip$|\
^test_translated_layer$|\ ^test_translated_layer$|\
^test_imperative_resnet$|\ ^test_imperative_resnet$|\
^test_imperative_resnet_sorted_gradient$|\ ^test_imperative_resnet_sorted_gradient$|\
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册