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 2020/08/24 22:49:40 UTC

[GitHub] [incubator-mxnet] Zha0q1 opened a new issue #19006: Numpy Equal Broadcast Type Large Tensor Bug

Zha0q1 opened a new issue #19006:
URL: https://github.com/apache/incubator-mxnet/issues/19006


   ```python
   import mxnet
   from mxnet import np, npx
   
   INT_OVERFLOW = 2**31
   
   A = np.array([INT_OVERFLOW])
   assert A == INT_OVERFLOW
   # OR
   assert A[0] == INT_OVERFLOW
   ```
   triggers
   ```
   ubuntu@ip-172-31-38-169:~/incubator-mxnet$ python shapearray.py 
   [22:46:12] ../src/storage/storage.cc:198: Using Pooled (Naive) StorageManager for CPU
   Traceback (most recent call last):
     File "shapearray.py", line 10, in <module>
       assert A == INT_OVERFLOW
     File "/home/ubuntu/incubator-mxnet/python/mxnet/numpy/multiarray.py", line 260, in _wrap_mxnp_np_ufunc
       return func(x1, x2)
     File "/home/ubuntu/incubator-mxnet/python/mxnet/numpy/multiarray.py", line 1119, in __eq__
       return equal(self, other)
     File "/home/ubuntu/incubator-mxnet/python/mxnet/numpy/multiarray.py", line 9089, in equal
       return _mx_nd_np.equal(x1, x2, out)
     File "/home/ubuntu/incubator-mxnet/python/mxnet/ndarray/numpy/_op.py", line 7168, in equal
       return _api_internal.equal(x1, x2, out)
     File "/home/ubuntu/incubator-mxnet/python/mxnet/_ffi/_ctypes/function.py", line 115, in __call__
       raise get_last_ffi_error()
   mxnet.base.MXNetError: Traceback (most recent call last):
     File "../include/mxnet/runtime/packed_func.h", line 412
   MXNetError: Check failed: value_.v_int64 <= std: :numeric_limits<int>::max() (2147483648 vs. 2147483647) : 
   ```
   I am working on a simple fix


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [incubator-mxnet] Zha0q1 commented on issue #19006: Numpy Equal Broadcast Type Large Int Bug

Posted by GitBox <gi...@apache.org>.
Zha0q1 commented on issue #19006:
URL: https://github.com/apache/incubator-mxnet/issues/19006#issuecomment-679430098


   update: 
   == != < > <= >= are all affected, but after the fix they seem to be working


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [incubator-mxnet] szha closed issue #19006: Numpy Equal Broadcast Type Large Int Bug

Posted by GitBox <gi...@apache.org>.
szha closed issue #19006:
URL: https://github.com/apache/incubator-mxnet/issues/19006


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [incubator-mxnet] Zha0q1 edited a comment on issue #19006: Numpy Equal Broadcast Type Large Int Bug

Posted by GitBox <gi...@apache.org>.
Zha0q1 edited a comment on issue #19006:
URL: https://github.com/apache/incubator-mxnet/issues/19006#issuecomment-679430098


   update: 
   == != < > <= >= are all affected, but after the fix they seem to be working
   
   The scalar side of those comparison operators used to be converted to int32. Now I changed them all to int64_t.
   
   Note that this is not an indexing issue but rather a value issue


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [incubator-mxnet] Zha0q1 edited a comment on issue #19006: Numpy Equal Broadcast Type Large Int Bug

Posted by GitBox <gi...@apache.org>.
Zha0q1 edited a comment on issue #19006:
URL: https://github.com/apache/incubator-mxnet/issues/19006#issuecomment-679430098


   update: 
   == != < > <= >= are all affected, but after the fix they seem to be working
   
   The scalar side of those comparison operators used to be converted to int32. Now I changed them all to int64_t.
   
   Note that this is not an indexing issue but rather a value issue. Also note that to have very large int tensors we need to set dtype to int64


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [incubator-mxnet] Zha0q1 edited a comment on issue #19006: Numpy Equal Broadcast Type Large Int Bug

Posted by GitBox <gi...@apache.org>.
Zha0q1 edited a comment on issue #19006:
URL: https://github.com/apache/incubator-mxnet/issues/19006#issuecomment-679430098


   update: 
   == != < > <= >= are all affected, but after the fix they seem to be working
   
   The scalar side of those comparison operators used to be converted to int32. Now I changed them all to int64_t.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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