jinfei3459 opened a new issue #14643: Check failed: inputs[i]->ctx() == 
default_ctx (cpu(0) vs. gpu(0)) CachedOp requires all inputs to live on the 
same context. But data is on gpu(0) while conv0_weight is on cpu(0)
URL: https://github.com/apache/incubator-mxnet/issues/14643
 
 
   ## Description
   (Brief description of the problem in no more than 2 sentences.)
   Check failed: inputs[i]->ctx() == default_ctx (cpu(0) vs. gpu(0)) CachedOp 
requires all inputs to live on the same context. But data is on gpu(0) while 
conv0_weight is on cpu(0)
   
   
   ```
   ----------Python Info----------
   Version      : 3.6.5
   Compiler     : GCC 5.4.0 20160609
   Build        : ('default', 'Aug 21 2018 22:24:01')
   Arch         : ('64bit', 'ELF')
   ------------Pip Info-----------
   Version      : 19.0.3
   Directory    : /usr/local/lib/python3.6/site-packages/pip
   ----------MXNet Info-----------
   Version      : 1.3.0
   Directory    : /data4/zjf/install_packs/mxnet-131/python/mxnet
   Hashtag not found. Not installed from pre-built package.
   ----------System Info----------
   Platform     : Linux-4.13.0-36-generic-x86_64-with-debian-stretch-sid
   system       : Linux
   node         : b54eacad8078
   release      : 4.13.0-36-generic
   version      : #40~16.04.1-Ubuntu SMP Fri Feb 16 23:25:58 UTC 2018
   ----------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):                56
   On-line CPU(s) list:   0-55
   Thread(s) per core:    2
   Core(s) per socket:    14
   Socket(s):             2
   NUMA node(s):          2
   Vendor ID:             GenuineIntel
   CPU family:            6
   Model:                 63
   Model name:            Intel(R) Xeon(R) CPU E5-2683 v3 @ 2.00GHz
   Stepping:              2
   CPU MHz:               2000.167
   CPU max MHz:           3000.0000
   CPU min MHz:           1200.0000
   BogoMIPS:              4000.33
   Virtualization:        VT-x
   Hypervisor vendor:     vertical
   Virtualization type:   full
   L1d cache:             32K
   L1i cache:             32K
   L2 cache:              256K
   L3 cache:              35840K
   NUMA node0 CPU(s):     0-13,28-41
   NUMA node1 CPU(s):     14-27,42-55
   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 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 dca sse4_1 sse4_2 x2apic movbe popcnt 
aes xsave avx f16c rdrand lahf_lm abm cpuid_fault epb invpcid_single pti 
retpoline intel_ppin tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust 
bmi1 avx2 smep bmi2 erms invpcid cqm xsaveopt cqm_llc cqm_occup_llc dtherm ida 
arat pln pts
   ----------Network Test----------
   Setting timeout: 10
   Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0717 
sec, LOAD: 1.4252 sec.
   Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.2446 sec, LOAD: 
2.2336 sec.
   Timing for Gluon Tutorial(cn): https://zh.gluon.ai, DNS: 0.2533 sec, LOAD: 
1.8734 sec.
   Timing for FashionMNIST: 
https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz,
 DNS: 0.2711 sec, LOAD: 5.3164 sec.
   Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0585 sec, LOAD: 
4.4097 sec.
   Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0928 sec, 
LOAD: 1.1031 sec.
   
   i try to use 'export_block' to export my gluoncv model,but failed!
   ```
   Traceback (most recent call last):
     File "export2mxnet.py", line 22, in <module>
       export_block('sppe/pose', model, preprocess=None, ctx=ctx)
     File 
"/usr/local/lib/python3.6/site-packages/gluoncv/utils/export_helper.py", line 
115, in export_block
       raise RuntimeError(str(last_exception).splitlines()[0])
   RuntimeError: [13:24:09] src/imperative/cached_op.cc:846: Check failed: 
inputs[i]->ctx() == default_ctx (cpu(0) vs. gpu(0)) CachedOp requires all 
inputs to live on the same context. But data is on gpu(0) while conv0_weight is 
on cpu(0)
   ```

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

Reply via email to