This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
mx.sym.argsort() cannot sort array with large tensor #7510
Comments
I've confirmed. This is a bug. I'll look into what caused it. It may be related to the way I do batched sort. |
I'll switch to the cub to have a try. |
OK, I've found the problem. It's this line https://github.com/apache/incubator-mxnet/blob/master/src/operator/tensor/ordering_op-inl.h#L207. When there are too many elements, the |
I'll pr the fix after the MShadow side is merged. |
Thank you so much for your timely update! @sxjscience |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
For bugs or installation issues, please provide the following information.
The more information you provide, the more likely people will be able to help you.
Environment info
Operating System: ubuntu 14.04
Compiler: GCC4.4.7
Package used (Python/R/Scala/Julia): python
MXNet version: 0.11.0
MXNet commit hash : 568b5a2
Minimum reproducible example
if you are using your own code, please provide a short script that reproduces the error.
Steps to reproduce
cnt!=0
, which should be 0 because the argsort should return all the integer from 0 to 2047.result[4, 0, i]
has been changed toresult[3, 0, i]
, the result will be correct again.What have you tried to solve it?
1.If the size of coord_data is (10000, 2048), and the axis in argsort changed to 1, then
result[8000, :]
will cover from 0 to 2047 as desired; butvis[int(result[9000, i])]
will be incorrect again. (I guess it may because 8000<4*2048<9000)2. By several tests, it seems that the argsort function can only deal with the first 2^24 element.
The text was updated successfully, but these errors were encountered: