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/06/26 00:26:51 UTC

[GitHub] toddsundsted opened a new issue #11398: Floating Point Exception after Array Creation

toddsundsted opened a new issue #11398: Floating Point Exception after Array Creation
URL: https://github.com/apache/incubator-mxnet/issues/11398
 
 
   ## Description
   Expressions like `nd.random_uniform(shape=[5, 5, -2])` and `nd.random_uniform(shape=[5, 5, 0])` cause the runtime to crash (the former with `std::bad_alloc`, the latter with `Floating point exception: 8`. It's a problem in versions 1.1.0 to 1.1.3 (master).
   
   ## Environment info (Required)
   ```
   ----------Python Info----------
   Version      : 3.6.4
   Compiler     : GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)
   Build        : ('default', 'Jan 16 2018 12:04:33')
   Arch         : ('64bit', '')
   ------------Pip Info-----------
   Version      : 10.0.1
   Directory    : /Users/tsundsted/miniconda3/lib/python3.6/site-packages/pip
   ----------MXNet Info-----------
   Version      : 1.1.0
   Directory    : /Users/tsundsted/miniconda3/lib/python3.6/site-packages/mxnet
   Hashtag not found. Not installed from pre-built package.
   ----------System Info----------
   Platform     : Darwin-16.7.0-x86_64-i386-64bit
   system       : Darwin
   node         : Todds-MacBook-Pro.local
   release      : 16.7.0
   version      : Darwin Kernel Version 16.7.0: Fri Apr 27 17:59:46 PDT 2018; root:xnu-3789.73.13~1/RELEASE_X86_64
   ----------Hardware Info----------
   machine      : x86_64
   processor    : i386
   b'machdep.cpu.extfeatures: SYSCALL XD 1GBPAGE EM64T LAHF LZCNT RDTSCP TSCI'
   b'machdep.cpu.leaf7_features: SMEP ERMS RDWRFSGS TSC_THREAD_OFFSET BMI1 AVX2 BMI2 INVPCID FPU_CSDS'
   b'machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX SMX EST TM2 SSSE3 FMA CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC MOVBE POPCNT AES PCID XSAVE OSXSAVE SEGLIM64 TSCTMR AVX1.0 RDRAND F16C'
   b'machdep.cpu.brand_string: Intel(R) Core(TM) i7-4960HQ CPU @ 2.60GHz'
   ----------Network Test----------
   Setting timeout: 10
   Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0176 sec, LOAD: 0.4752 sec.
   Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.4092 sec, LOAD: 0.6132 sec.
   Timing for Gluon Tutorial(cn): https://zh.gluon.ai, DNS: 3.4790 sec, LOAD: 0.7560 sec.
   Timing for FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.1225 sec, LOAD: 0.8626 sec.
   Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0179 sec, LOAD: 0.4299 sec.
   Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0157 sec, LOAD: 0.3484 sec.
   ```
   
   I'm using Python.
   
   ## Error Message:
   ```
   $ python
   Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 12:04:33)
   [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
   Type "help", "copyright", "credits" or "license" for more information.
   >>> import mxnet as mx
   >>> import mxnet.ndarray as nd
   >>> nd.random_uniform(shape=[5, 5, -2])
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "/Users/tsundsted/miniconda3/lib/python3.6/site-packages/mxnet/ndarray/ndarray.py", line 182, in __repr__
       return '\n%s\n<%s %s @%s>' % (str(self.asnumpy()),
     File "/Users/tsundsted/miniconda3/lib/python3.6/site-packages/mxnet/ndarray/ndarray.py", line 1793, in asnumpy
   libc++abi.dylib: terminating with uncaught exception of type std::bad_alloc: std::bad_alloc
   Abort trap: 6
   ```
   ```
   $ python
   Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 12:04:33)
   [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
   Type "help", "copyright", "credits" or "license" for more information.
   >>> import mxnet as mx
   >>> import mxnet.ndarray as nd
   >>> nd.random_uniform(shape=[5, 5, 0])
   Floating point exception: 8
   ```
   ## Minimum reproducible example
   Any shape with a non-positive dimension size: for example, `nd.random_uniform(shape=[5, 5, -2])` and `nd.random_uniform(shape=[5, 5, 0])`.
   
   ## Steps to reproduce
   1. run python
   2. `import mxnet as mx`
   3. `import mxnet.ndarray as nd`
   4. `nd.random_uniform(shape=[5, 5, 0])`
   
   ## What have you tried to solve it?
   Created https://github.com/apache/incubator-mxnet/pull/11397
   

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