From ebb92881787a35317436d7becf316b88d7e92610 Mon Sep 17 00:00:00 2001 From: "Joshua Z. Zhang" Date: Thu, 3 Oct 2019 17:16:56 -0700 Subject: [PATCH] address comments --- tests/python/unittest/test_contrib_operator.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/python/unittest/test_contrib_operator.py b/tests/python/unittest/test_contrib_operator.py index 08893365f6dd..ce02dc076391 100644 --- a/tests/python/unittest/test_contrib_operator.py +++ b/tests/python/unittest/test_contrib_operator.py @@ -23,7 +23,7 @@ import itertools from numpy.testing import assert_allclose, assert_array_equal from mxnet.test_utils import * -from common import with_seed +from common import with_seed, assert_raises_cudnn_not_satisfied import unittest def test_box_nms_op(): @@ -335,6 +335,7 @@ def test_multibox_prior_op(): assert_allclose(boxes.asnumpy()[250, 250, 0, :], np.array([-0.948249, 0.362671, 1.636436, 0.530377]), atol=1e-5, rtol=1e-5) @with_seed() +@assert_raises_cudnn_not_satisfied(min_version='5.1.10') def test_modulated_deformable_convolution(): for num_batch in [1, 2]: for num_channel_data, num_deformable_group in itertools.product([4, 8], [1, 2]): @@ -369,9 +370,8 @@ def test_modulated_deformable_convolution(): else: rtol, atol = 0.05, 1e-3 # By now we only have gpu implementation - if default_context().device_type == 'gpu': - check_numeric_gradient(op, [im_data, offset_data, mask_data, weight, bias], rtol=rtol, atol=atol, - grad_nodes=grad_nodes, ctx=mx.gpu(0)) + check_numeric_gradient(op, [im_data, offset_data, mask_data, weight, bias], rtol=rtol, atol=atol, + grad_nodes=grad_nodes, ctx=mx.gpu(0)) if __name__ == '__main__':