未验证 提交 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 @@
#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
......
......@@ -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$|\
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册