eric-haibin-lin commented on a change in pull request #9716: [MXNET-267] Reduce 
ndarray size in test which produces a huge memory spike which …
URL: https://github.com/apache/incubator-mxnet/pull/9716#discussion_r180849270
 
 

 ##########
 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:
   Agree that it's a bit heavy for an unit test. Shall we move it to the 
nightly test suite? 

----------------------------------------------------------------
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