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 2019/01/30 23:55:50 UTC

[GitHub] wkcn opened a new issue #14030: The bug in MXTVMBridge

wkcn opened a new issue #14030: The bug in MXTVMBridge
URL: https://github.com/apache/incubator-mxnet/issues/14030
 
 
   ## Description
   Hi, there.
   
   I would like to use `MXTVMBridge` to accelerate my project, but there is a flaky problem.
   The example works when MXNet is built from source by myself, but it doesn't work when MXNet is installed by PIP.
   
   ## Environment info (Required)
   
   Package used (Python/R/Scala/Julia):
   Python
   
   ## Build info (Required if built from source)
   
   Compiler (gcc/clang/mingw/visual studio): gcc
   
   MXNet commit hash: 
   e37ff53f0a3a0cc9276a7a1d4aff0deab91c40df
   
   Build config:
   `make -j 5 USE_OPENCV=0 USE_BLAS=openblas `
   
   ## Minimum reproducible example
   https://github.com/wkcn/test_tvm_bridge
   
   In this example, tvm_packed_func.h is simplyfied from TVM.
   
   ## Steps to reproduce
   
   1. clone the example
   2. change the path of libmxnet.so in the line 55 of the code.
   3. make
   4. ./test
   
   ## What have you tried to solve it?
   
   In the function [`SetMXTVMBridge`](https://github.com/wkcn/test_tvm_bridge/blob/master/test.cpp#L28) of the reproducible example,
   `args.num_args` is wrong and `args.values[0].v_str` is sometimes wrong when MXNet is installed by pip, namely `pip install mxnet --pre`.
   However, the result is correct when MXNet is built by myself, `make -j 5 USE_OPENCV=1 USE_BLAS=openblas` in the latest MXNet source.
   
   In the PR #9880,  merrymercy met a similar problem. https://github.com/apache/incubator-mxnet/pull/9880#issuecomment-421779923
   
   
   It seems the temporary variable `TVMArgs {"WrapAsyncCall", PackedFunc(mxnet::WrapAsyncCall)}` is released before calling `fregister` in the function [`MXTVMBridge`](https://github.com/apache/incubator-mxnet/blob/master/src/nnvm/tvm_bridge.cc#L178) because of optimization of compiler.
   
   Thanks!
   

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