windclarion opened a new issue #5221: NodeFunctor calls un-registered function 
on type tir.PrimFunc
URL: https://github.com/apache/incubator-tvm/issues/5221
 
 
   I sync the latest code and only add one statement at function 
BuildForIRModule in tvm/src/code/target.cc:
   
   LOG(INFO) << "BuildForIRModule:module=" << AsText(module, false);
   
   and run the first function test_multi_node_compiler  in 
tvm/tests/python/relay/test_pass_partition_graph.py,report runtime fail:
   
   Traceback (most recent call last):
   
     File "test_pass_partition_graph.py", line 896, in <module>
       test_multi_node_compiler()
   
     File "test_pass_partition_graph.py", line 261, in test_multi_node_compiler
       axis=0))
   
     File "test_pass_partition_graph.py", line 208, in check_result
       check_graph_runtime_result()
   
     File "test_pass_partition_graph.py", line 193, in 
check_graph_runtime_result
       json, lib, param = relay.build(mod, target=target, params=params)
   
     File "tvm/python/tvm/relay/build_module.py", line 251, in build
       graph_json, mod, params = bld_mod.build(mod, target, target_host, params)
   
     File "tvm/python/tvm/relay/build_module.py", line 120, in build
       self._build(mod, target, target_host)
   
     File "tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 213, in __call__
       raise get_last_ffi_error()
   
   tvm._ffi.base.TVMError: Traceback (most recent call last):
     [bt] (8) 
tvm/build/libtvm.so(tvm::relay::RelayTextPrinter::PrintFinal(tvm::runtime::ObjectRef
 const&)+0x227) [0x7f0cbd8e6267]
     [bt] (7) 
tvm/build/libtvm.so(tvm::relay::RelayTextPrinter::PrintScope(tvm::runtime::ObjectRef
 const&)+0xa5) [0x7f0cbd8f1885]
     [bt] (6) 
tvm/build/libtvm.so(tvm::relay::RelayTextPrinter::Print(tvm::runtime::ObjectRef 
const&, bool, bool)+0x33e) [0x7f0cbd8e56de]
     [bt] (5) 
tvm/build/libtvm.so(tvm::relay::RelayTextPrinter::PrintMod(tvm::IRModule 
const&)+0x417) [0x7f0cbd8ec237]
     [bt] (4) 
tvm/build/libtvm.so(tvm::relay::DependencyGraph::Create(tvm::support::Arena*, 
tvm::RelayExpr const&)+0x90) [0x7f0cbdbba000]
     [bt] (3) 
tvm/build/libtvm.so(tvm::relay::DependencyGraph::Creator::VisitExpr(tvm::RelayExpr
 const&)+0x272) [0x7f0cbdbba4b2]
     [bt] (2) tvm/build/libtvm.so(tvm::relay::ExprFunctor<void (tvm::RelayExpr 
const&)>::VisitExpr(tvm::RelayExpr const&)+0x84) [0x7f0cbdbbc6c4]
     [bt] (1) tvm/build/libtvm.so(tvm::NodeFunctor<void 
(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<void (tvm::RelayExpr 
const&)>*)>::operator()(tvm::runtime::ObjectRef const&, 
tvm::relay::ExprFunctor<void (tvm::RelayExpr const&)>*) const+0xd2) 
[0x7f0cbdbbc972]
     [bt] (0) 
tvm/build/libtvm.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x32) 
[0x7f0cbd562ee2]
     File "tvm/include/tvm/node/functor.h", line 95
   TVMError: Check failed: can_dispatch(n): NodeFunctor calls un-registered 
function on type tir.PrimFunc
   
   
   I read the code tvm/src/tir/ir/function.cc, PrimFuncNode has been registed 
by TVM_STATIC_IR_FUNCTOR, so I guess 
tvm::relay::DependencyGraph::Creator::VisitExpr   only  face to Expr in relay, 
not  Expr in tir,   because I  found 2 files: 
tvm/include/tvm/relay/expr_functor.h   and tvm/include/tvm/tir/expr_functor.h, 
and tvm/src/relay/analysis/dependency_graph.cc only  include relay's 
expr_functor.h.
   
   

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