ZiyueHuang commented on a change in pull request #9716: Reduce ndarray size in 
test which produces a huge memory spike which ?
URL: https://github.com/apache/incubator-mxnet/pull/9716#discussion_r166902552
 
 

 ##########
 File path: tests/python/unittest/test_ndarray.py
 ##########
 @@ -590,9 +590,8 @@ def gt_topk(dat, axis, ret_typ, k, is_ascend):
     gt = gt_topk(a_npy, axis=None, ret_typ="indices", k=5*5*5*5, 
is_ascend=False)
     assert_almost_equal(nd_ret_argsort, gt)
 
-    # test topk with a big shape
-    a = mx.nd.arange(0, 54686454, step=1, repeat=1)
-    assert_almost_equal(a.topk(k=54686454).asnumpy(), a.asnumpy()[::-1])
+    a = mx.nd.arange(0, 1024, step=1, repeat=1)
+    assert_almost_equal(a.topk(k=1024).asnumpy(), a.asnumpy()[::-1])
 
 Review comment:
   `k = 1024` cannot test against the failure in 
https://github.com/apache/incubator-mxnet/issues/8303. What platforms does this 
test crash?
   
   By the way, here is another test for big shape, 
https://github.com/apache/incubator-mxnet/blob/master/tests/python/unittest/test_optimizer.py#L237

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to