You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mxnet.apache.org by GitBox <gi...@apache.org> on 2021/04/13 07:34:55 UTC

[GitHub] [incubator-mxnet] tangzhongliang opened a new issue #20159: mx.symbol.contrib.foreach cause memory leaky

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


   ## Description
   (A clear and concise description of what the bug is.)
   when the foreach function is used to generate the index of minibatch,  GPU memory will increase until that CUDNN_STATUS_EXECUTION_FAILED exception is throwd
   ### Error Message
   (Paste the complete error message. Please also include stack trace by setting environment variable `DMLC_LOG_STACK_TRACE_DEPTH=100` before running your script.)
   Check failed: e == CUDNN_STATUS_SUCCESS (8 vs. 0) : CUDNN_STATUS_EXECUTION_FAILED
   ## To Reproduce
   (If you developed your own code, please provide a short script that reproduces the error. For existing examples, please provide link.)
   ```
   step = lambda d, i: (d+i, i+4)
   states = mx.symbol.Variable("states") # shape is (1,)
   states = mx.symbol.Variable("data") # shape is (batch_size,)
   index, _ = mx.symbol.contrib.foreach(step, data, state)
   pred = mx.symbol.contrib.take(pred, index, axis=0) # pred' first dim is batch_size*4
   ```
   ### Steps to reproduce
   (Paste the commands you ran that produced the error.)
   
   1.
   2.
   
   ## What have you tried to solve it?
   
   1. When use a fixed index instead of dynamic index generated by foreach function, gpu memory remain unchanged and no error happen
   
   ## Environment
   
   ***We recommend using our script for collecting the diagnostic information with the following command***
   `curl --retry 10 -s https://raw.githubusercontent.com/apache/incubator-mxnet/master/tools/diagnose.py | python3`
   <details>
   <summary>Environment Information</summary>
   ```
   # Paste the diagnose.py command output here
   
   ```
   Architecture:        x86_64
   CPU op-mode(s):      32-bit, 64-bit
   Byte Order:          Little Endian
   CPU(s):              12
   On-line CPU(s) list: 0-11
   Thread(s) per core:  2
   Core(s) per socket:  6
   Socket(s):           1
   NUMA node(s):        1
   Vendor ID:           GenuineIntel
   CPU family:          6
   Model:               158
   Model name:          Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
   Stepping:            10
   CPU MHz:             4009.298
   CPU max MHz:         4700.0000
   CPU min MHz:         800.0000
   BogoMIPS:            7399.70
   Virtualization:      VT-x
   L1d cache:           32K
   L1i cache:           32K
   L2 cache:            256K
   L3 cache:            12288K
   NUMA node0 CPU(s):   0-11
   Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d
   ----------Python Info----------
   Version      : 3.6.5
   Compiler     : GCC 7.2.0
   Build        : ('default', 'Apr 29 2018 16:14:56')
   Arch         : ('64bit', '')
   ------------Pip Info-----------
   Version      : 20.3.3
   Directory    : /root/anaconda3/envs/japan_recognize/lib/python3.6/site-packages/pip
   ----------MXNet Info-----------
   Version      : 1.7.0
   Directory    : /root/anaconda3/envs/japan_recognize/lib/python3.6/site-packages/mxnet
   Commit Hash   : 64f737cdd59fe88d2c5b479f25d011c5156b6a8a
   64f737cdd59fe88d2c5b479f25d011c5156b6a8a
   64f737cdd59fe88d2c5b479f25d011c5156b6a8a
   64f737cdd59fe88d2c5b479f25d011c5156b6a8a
   64f737cdd59fe88d2c5b479f25d011c5156b6a8a
   64f737cdd59fe88d2c5b479f25d011c5156b6a8a
   64f737cdd59fe88d2c5b479f25d011c5156b6a8a
   64f737cdd59fe88d2c5b479f25d011c5156b6a8a
   64f737cdd59fe88d2c5b479f25d011c5156b6a8a
   64f737cdd59fe88d2c5b479f25d011c5156b6a8a
   Library      : ['/root/anaconda3/envs/japan_recognize/lib/python3.6/site-packages/mxnet/libmxnet.so']
   Build features:
   ✔ CUDA
   ✔ CUDNN
   ✔ NCCL
   ✔ CUDA_RTC
   ✖ TENSORRT
   ✔ CPU_SSE
   ✔ CPU_SSE2
   ✔ CPU_SSE3
   ✔ CPU_SSE4_1
   ✔ CPU_SSE4_2
   ✖ CPU_SSE4A
   ✔ CPU_AVX
   ✖ CPU_AVX2
   ✔ OPENMP
   ✖ SSE
   ✔ F16C
   ✖ JEMALLOC
   ✔ BLAS_OPEN
   ✖ BLAS_ATLAS
   ✖ BLAS_MKL
   ✖ BLAS_APPLE
   ✔ LAPACK
   ✔ MKLDNN
   ✔ OPENCV
   ✖ CAFFE
   ✖ PROFILER
   ✔ DIST_KVSTORE
   ✖ CXX14
   ✖ INT64_TENSOR_SIZE
   ✔ SIGNAL_HANDLER
   ✖ DEBUG
   ✖ TVM_OP
   ----------System Info----------
   Platform     : Linux-4.15.0-135-generic-x86_64-with-debian-buster-sid
   system       : Linux
   node         : zhouwen-XPS-8930
   release      : 4.15.0-135-generic
   version      : #139-Ubuntu SMP Mon Jan 18 17:38:24 UTC 2021
   ----------Hardware Info----------
   machine      : x86_64
   processor    : x86_64
   ----------Network Test----------
   Setting timeout: 10
   Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0875 sec, LOAD: 0.8739 sec.
   Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.1443 sec, LOAD: 1.5021 sec.
   Error open Gluon Tutorial(cn): https://zh.gluon.ai, <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)>, DNS finished in 0.1803276538848877 sec.
   Timing for FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.1336 sec, LOAD: 1.1317 sec.
   Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0894 sec, LOAD: 4.9684 sec.
   Error open Conda: https://repo.continuum.io/pkgs/free/, HTTP Error 403: Forbidden, DNS finished in 0.0002872943878173828 sec.
   ----------Environment----------
   KMP_DUPLICATE_LIB_OK="True"
   KMP_INIT_AT_FORK="FALSE"
   
   </details>
   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org