matteosal opened a new issue #15659: Dropout produces wrong mask with MKL-DNN URL: https://github.com/apache/incubator-mxnet/issues/15659 ## Description Dropout mask (second output) is always full of zeros when mxnet is built with MKL-DNN. Weirdly, setting `MXNET_MKLDNN_ENABLED=0` doesn't fix it, but using a build without MKL-DNN does. ## Environment info (Required) ``` ----------Python Info---------- Version : 3.7.2 Compiler : GCC 7.3.0 Build : ('default', 'Dec 29 2018 06:19:36') Arch : ('64bit', '') ------------Pip Info----------- Version : 19.0.1 Directory : /opt/Anaconda/lib/python3.7/site-packages/pip ----------MXNet Info----------- Version : 1.5.0 Directory : /home/matteo/Git/mxnet/python/mxnet Commit hash file "/home/matteo/Git/mxnet/python/mxnet/COMMIT_HASH" not found. Not installed from pre-built package or built from source. Library : ['/home/matteo/Git/mxnet/python/mxnet/../../lib/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 ----------System Info---------- Platform : Linux-4.15.0-55-generic-x86_64-with-debian-buster-sid system : Linux node : mongolius release : 4.15.0-55-generic version : #60-Ubuntu SMP Tue Jul 2 18:22:20 UTC 2019 ----------Hardware Info---------- machine : x86_64 processor : x86_64 Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 8 On-line CPU(s) list: 0-7 Thread(s) per core: 2 Core(s) per socket: 4 Socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 94 Model name: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz Stepping: 3 CPU MHz: 2700.253 CPU max MHz: 3500,0000 CPU min MHz: 800,0000 BogoMIPS: 5184.00 Virtualization: VT-x L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 6144K NUMA node0 CPU(s): 0-7 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 tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx 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 ----------Network Test---------- Setting timeout: 10 Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0117 sec, LOAD: 0.8935 sec. Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.0599 sec, LOAD: 2.1901 sec. Timing for Gluon Tutorial(cn): https://zh.gluon.ai, DNS: 0.1028 sec, LOAD: 0.9832 sec. Timing for FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.0657 sec, LOAD: 1.2597 sec. Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0380 sec, LOAD: 0.8543 sec. Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0395 sec, LOAD: 0.4625 sec. ``` Using python package. ## Build info (Required if built from source) Compiler: gcc MXNet commit hash: 076b2f330c60f05cb939beea28dd04cd571a34c0 Build config: plain `config.mk`, except for `USE_OPENCV=0` ## Minimum reproducible example ``` import mxnet as mx json = '{\"nodes\":[{\"op\":\"null\",\"name\":\"in\",\"inputs\":[]},{\"op\":\ \"Dropout\",\"name\":\"dropout\",\"attrs\":{\"axes\":\"()\",\"mode\":\ \"always\",\"p\":\"0.2\"},\"inputs\":[[0,0,0]]}],\"arg_nodes\":[0],\"\ heads\":[[1,0,0],[1,1,0]]}' sym = mx.sym.load_json(json) ex = sym.bind(mx.cpu(), {'in': mx.nd.array(range(10))}) ex.forward() print(ex.outputs) ``` When running the above script using a build with MKL-DNN, the second output is full of `1.e-45`. When using a build without MKL-DNN, it is as expected. A side question: if I were to build that symbol using the symbol API, how would I grab the second Drouput output?
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
