From 1540df51cf5b88a08afec4e94d5fc86d4ddfe5c5 Mon Sep 17 00:00:00 2001 From: Jacek Czaja Date: Tue, 27 Nov 2018 11:41:53 +0100 Subject: [PATCH] - Fix to test_conv2d_transpose_mkldnn for GPU test=develop --- paddle/fluid/operators/conv_transpose_op.cc | 3 +++ .../fluid/tests/unittests/test_conv2d_transpose_mkldnn_op.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/paddle/fluid/operators/conv_transpose_op.cc b/paddle/fluid/operators/conv_transpose_op.cc index fe09b5c17..2fdfc40d1 100644 --- a/paddle/fluid/operators/conv_transpose_op.cc +++ b/paddle/fluid/operators/conv_transpose_op.cc @@ -256,6 +256,9 @@ void Conv3DTransposeOpMaker::Make() { "use_cudnn", "(bool, default false) Only used in cudnn kernel, need install cudnn") .SetDefault(false); + AddAttr("use_mkldnn", + "(bool, default false) Only used in mkldnn kernel") + .SetDefault(false); AddAttr( "data_format", "(string, default NCHW) Only used in " diff --git a/python/paddle/fluid/tests/unittests/test_conv2d_transpose_mkldnn_op.py b/python/paddle/fluid/tests/unittests/test_conv2d_transpose_mkldnn_op.py index 01a7cd6ca..deefdd09a 100644 --- a/python/paddle/fluid/tests/unittests/test_conv2d_transpose_mkldnn_op.py +++ b/python/paddle/fluid/tests/unittests/test_conv2d_transpose_mkldnn_op.py @@ -25,6 +25,7 @@ class TestMKLDNN(TestConv2dTransposeOp): self.use_mkldnn = True self.data_format = "NCHW" self.op_type = "conv2d_transpose" + self._cpu_only = True def test_check_grad(self): return @@ -42,6 +43,7 @@ class TestMKLDNNWithPad(TestWithPad): self.use_mkldnn = True self.data_format = "NCHW" self.op_type = "conv2d_transpose" + self._cpu_only = True def test_check_grad(self): return @@ -59,6 +61,7 @@ class TestMKLDNNWithStride(TestWithStride): self.use_mkldnn = True self.data_format = "NCHW" self.op_type = "conv2d_transpose" + self._cpu_only = True def test_check_grad(self): return -- GitLab