From 3acac914172d6c37eaa31b589b594ecec53320c4 Mon Sep 17 00:00:00 2001 From: zixuanweeei Date: Tue, 23 Jul 2019 09:52:25 +0800 Subject: [PATCH 1/5] Skip test_convolution_independent_gradirents --- tests/python/unittest/test_operator.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/python/unittest/test_operator.py b/tests/python/unittest/test_operator.py index d195ea9ef2f3..fb0b62917301 100644 --- a/tests/python/unittest/test_operator.py +++ b/tests/python/unittest/test_operator.py @@ -2002,9 +2002,10 @@ def test_depthwise_convolution(): @with_seed() def test_convolution_independent_gradients(): ctx = default_context() - # set a low bar for autotuned cudnn conv - atol = 1.0e-1 if ctx.device_type == "gpu" else 1.0e-3 - rtol = 1.0e-2 if ctx.device_type == "gpu" else 1.0e-3 + if ctx.device_type == "gpu": + return + atol = 1.0e-3 + rtol = 1.0e-3 reqs = ["null", "write", "add"] var_names = ["x", "w", "b"] dims = [1, 2] From 9a544d099279eeb0a3e56028bfbc00586be57f9f Mon Sep 17 00:00:00 2001 From: zixuanweeei Date: Tue, 23 Jul 2019 16:59:13 +0800 Subject: [PATCH 2/5] Add an issue link --- tests/python/unittest/test_operator.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/python/unittest/test_operator.py b/tests/python/unittest/test_operator.py index fb0b62917301..ab04296e2705 100644 --- a/tests/python/unittest/test_operator.py +++ b/tests/python/unittest/test_operator.py @@ -2001,9 +2001,10 @@ def test_depthwise_convolution(): @with_seed() def test_convolution_independent_gradients(): - ctx = default_context() - if ctx.device_type == "gpu": - return + # NOTE(zixuanweeei): Flaky test tracked by https://github.com/apache/incubator-mxnet/issues/15603. + # GPU context will be enabled after figuring out the possible issue tracked at + # https://github.com/apache/incubator-mxnet/issues/15638. + ctx = mx.cpu() atol = 1.0e-3 rtol = 1.0e-3 reqs = ["null", "write", "add"] From 72ee05d6b211efc27f392291eb3dda1d71ce1420 Mon Sep 17 00:00:00 2001 From: zixuanweeei Date: Wed, 24 Jul 2019 09:12:56 +0800 Subject: [PATCH 3/5] Fix inconsistent context of input array and binding op --- tests/python/unittest/test_operator.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/python/unittest/test_operator.py b/tests/python/unittest/test_operator.py index ab04296e2705..e4920e79b7e4 100644 --- a/tests/python/unittest/test_operator.py +++ b/tests/python/unittest/test_operator.py @@ -2036,14 +2036,14 @@ def test_convolution_independent_gradients(): for req_kind in reqs: # Binding args for conv with possible dependent gradients base_args = { - 'x': mx.nd.random.normal(shape=x_shape), - 'w': mx.nd.random.normal(shape=w_shape), - 'b': mx.nd.random.normal(shape=(num_filter, )) if not no_bias else None} + 'x': mx.nd.random.normal(shape=x_shape, ctx=ctx), + 'w': mx.nd.random.normal(shape=w_shape, ctx=ctx), + 'b': mx.nd.random.normal(shape=(num_filter, ), ctx=ctx) if not no_bias else None} args1 = copy.deepcopy(base_args) grad1 = { - 'x': mx.nd.zeros(shape=x_shape), - 'w': mx.nd.zeros(shape=w_shape), - 'b': mx.nd.zeros(shape=(num_filter, )) if not no_bias else None} + 'x': mx.nd.zeros(shape=x_shape, ctx=ctx), + 'w': mx.nd.zeros(shape=w_shape, ctx=ctx), + 'b': mx.nd.zeros(shape=(num_filter, ), ctx=ctx) if not no_bias else None} grad_req1 = [req_kind] * 3 grad_req1 = dict(zip(var_names, grad_req1)) @@ -2056,9 +2056,9 @@ def test_convolution_independent_gradients(): # Binding args for conv with independent gradients args2 = copy.deepcopy(base_args) # Deepcopy the same params of `exe1` grad2 = { - 'x': mx.nd.zeros(shape=x_shape), - 'w': mx.nd.zeros(shape=w_shape), - 'b': mx.nd.zeros(shape=(num_filter, )) if not no_bias else None} + 'x': mx.nd.zeros(shape=x_shape, ctx=ctx), + 'w': mx.nd.zeros(shape=w_shape, ctx=ctx), + 'b': mx.nd.zeros(shape=(num_filter, ), ctx=ctx) if not no_bias else None} grad_req2 = {"x": x_req, "w": w_req, "b": b_req} exe2 = conv.bind(ctx, args2, args_grad=grad2, grad_req=grad_req2) From c1216a628139922bd0b283c7727c0e8fd5841683 Mon Sep 17 00:00:00 2001 From: zixuanweeei Date: Thu, 25 Jul 2019 09:01:25 +0800 Subject: [PATCH 4/5] Trigger CI From 2358dd2f496f0aef50c7d1793604b9e6ac57c6b9 Mon Sep 17 00:00:00 2001 From: zixuanweeei Date: Thu, 25 Jul 2019 19:04:32 +0800 Subject: [PATCH 5/5] Retrigger CI