From e1d666fb8bd98117ad757e00cd35f05b3185332c Mon Sep 17 00:00:00 2001 From: Adam <38704900+grygielski@users.noreply.github.com> Date: Sun, 5 Jan 2020 05:11:05 +0100 Subject: [PATCH] Hotfix to MKL-DNN pool2d tests (#22086) --- .../tests/unittests/mkldnn/test_pool2d_mkldnn_op.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/python/paddle/fluid/tests/unittests/mkldnn/test_pool2d_mkldnn_op.py b/python/paddle/fluid/tests/unittests/mkldnn/test_pool2d_mkldnn_op.py index f22ca516ac2..785505e720c 100644 --- a/python/paddle/fluid/tests/unittests/mkldnn/test_pool2d_mkldnn_op.py +++ b/python/paddle/fluid/tests/unittests/mkldnn/test_pool2d_mkldnn_op.py @@ -26,6 +26,9 @@ def create_test_mkldnn_use_ceil_class(parent): def init_ceil_mode(self): self.ceil_mode = True + def init_data_type(self): + self.dtype = np.float32 + cls_name = "{0}_{1}".format(parent.__name__, "MKLDNNCeilModeCast") TestMKLDNNPool2DUseCeilCase.__name__ = cls_name globals()[cls_name] = TestMKLDNNPool2DUseCeilCase @@ -41,6 +44,9 @@ def create_test_mkldnn_class(parent): def init_kernel_type(self): self.use_mkldnn = True + def init_data_type(self): + self.dtype = np.float32 + cls_name = "{0}_{1}".format(parent.__name__, "MKLDNNOp") TestMKLDNNCase.__name__ = cls_name globals()[cls_name] = TestMKLDNNCase @@ -78,6 +84,9 @@ class TestAsymPad(TestPool2D_Op): def init_global_pool(self): self.global_pool = False + def init_data_type(self): + self.dtype = np.float32 + class TestAsymPadCase1(TestAsymPad): def init_paddings(self): -- GitLab