You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/02/08 22:39:00 UTC

[GitHub] larroy commented on a change in pull request #9716: Reduce ndarray size in test which produces a huge memory spike which ?

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

 ##########
 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:
   Raspberry PI, has only 1G of memory + swap. We are doing something wrong if we have to write a test with such a big allocation, if the type is wrong as in the issue that we have linked, this should be mocked, or tested in a smarted way. Not just allocating huge arrays willy-nilly.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services