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 2017/10/24 12:45:52 UTC
[GitHub] ZiyueHuang commented on a change in pull request #8398: fix topk with big shape
ZiyueHuang commented on a change in pull request #8398: fix topk with big shape
URL: https://github.com/apache/incubator-mxnet/pull/8398#discussion_r146546989
##########
File path: tests/python/unittest/test_ndarray.py
##########
@@ -593,6 +593,10 @@ def gt_topk(dat, axis, ret_typ, k, is_ascend):
nd_ret_argsort = mx.nd.argsort(a_nd, axis=None, is_ascend=False).asnumpy()
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)
Review comment:
After discussing with @sxjscience , we found that https://github.com/apache/incubator-mxnet/issues/8303 is because of the fix for range in mshadow https://github.com/dmlc/mshadow/commit/eced9571c601260e3a2deb0e8e9a41e8c0a9f0f1 is not included in mxnet master (range still use float).
So just replacing `range` with kernel launch can fix this issue. I change `int64` back to `int`. Or is `int64` better than `int` here?
----------------------------------------------------------------
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