tvm icon indicating copy to clipboard operation
tvm copied to clipboard

RuntimeError: Unsupported operator: global_pool_avg

Open angusHeZZ opened this issue 6 years ago • 4 comments

the call stack is :

Use implementation for op:  nn.global_avg_pool2d
local_pyfunc:  <function _wrap_default_fstrategy.<locals>._fstrategy at 0x7fa82330d840>
local_pyfunc:  <function schedule_adaptive_pool_cpu at 0x7fa84655d8c8>
Traceback (most recent call last):

  File "from_resnet18_mxnet.py", line 171, in <module>
    graph, lib, params = relay.build(func, target, target_host=target_host, params=relay_params)

  File "/home/zhongzheng.he/Project/stc-tvm/python/tvm/relay/build_module.py", line 251, in build
    graph_json, mod, params = bld_mod.build(mod, target, target_host, params)

  File "/home/zhongzheng.he/Project/stc-tvm/python/tvm/relay/build_module.py", line 120, in build
    self._build(mod, target, target_host)

  File "/home/zhongzheng.he/Project/stc-tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 220, in __call__
    raise get_last_ffi_error()

tvm._ffi.base.TVMError: Traceback (most recent call last):
  [bt] (8) /home/zhongzheng.he/Project/stc-tvm/build/libtvm.so(tvm::relay::CompileEngineImpl::CreateSchedule(tvm::relay::Function const&, tvm::Target const&)+0x89) [0x7fa827700a4b]
  [bt] (7) /home/zhongzheng.he/Project/stc-tvm/build/libtvm.so(tvm::relay::ScheduleGetter::Create(tvm::relay::Function const&)+0x8e0) [0x7fa8276f99c4]
  [bt] (6) /home/zhongzheng.he/Project/stc-tvm/build/libtvm.so(tvm::relay::OpImplementation::Schedule(tvm::Attrs const&, tvm::Array<tvm::te::Tensor, void> const&, tvm::Target const&)+0x56) [0x7fa8277bbf70]
  [bt] (5) /home/zhongzheng.he/Project/stc-tvm/build/libtvm.so(tvm::runtime::TypedPackedFunc<tvm::te::Schedule (tvm::Attrs const&, tvm::Array<tvm::te::Tensor, void> const&, tvm::Target const&)>::operator()(tvm::Attrs const&, tvm::Array<tvm::te::Tensor, void> const&, tvm::Target const&) const+0x71) [0x7fa8277bed15]
  [bt] (4) /home/zhongzheng.he/Project/stc-tvm/build/libtvm.so(tvm::te::Schedule tvm::runtime::detail::typed_packed_call_dispatcher<tvm::te::Schedule>::run<tvm::Attrs const&, tvm::Array<tvm::te::Tensor, void> const&, tvm::Target const&>(tvm::runtime::PackedFunc const&, tvm::Attrs const&, tvm::Array<tvm::te::Tensor, void> const&, tvm::Target const&)+0x71) [0x7fa8277bf587]
  [bt] (3) /home/zhongzheng.he/Project/stc-tvm/build/libtvm.so(tvm::runtime::TVMRetValue tvm::runtime::PackedFunc::operator()<tvm::Attrs const&, tvm::Array<tvm::te::Tensor, void> const&, tvm::Target const&>(tvm::Attrs const&, tvm::Array<tvm::te::Tensor, void> const&, tvm::Target const&) const+0x100) [0x7fa8277bff56]
  [bt] (2) /home/zhongzheng.he/Project/stc-tvm/build/libtvm.so(std::function<void (tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)>::operator()(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const+0x5a) [0x7fa826c3eea4]
  [bt] (1) /home/zhongzheng.he/Project/stc-tvm/build/libtvm.so(+0x3645fa0) [0x7fa8278a0fa0]
  [bt] (0) /home/zhongzheng.he/Project/stc-tvm/build/libtvm.so(+0x3645111) [0x7fa8278a0111]
  File "/home/zhongzheng.he/Project/stc-tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 79, in cfun
    rv = local_pyfunc(*pyargs)
  File "/home/zhongzheng.he/Project/stc-tvm/python/tvm/relay/op/strategy/x86.py", line 56, in schedule_adaptive_pool_cpu
    return topi.x86.schedule_adaptive_pool(outs)
  File "/home/zhongzheng.he/Project/stc-tvm/topi/python/topi/x86/pooling.py", line 159, in schedule_adaptive_pool
    traverse(outs[0].op)
  File "/home/zhongzheng.he/Project/stc-tvm/topi/python/topi/x86/pooling.py", line 155, in traverse
    raise RuntimeError("Unsupported operator: %s" % OP.tag)
RuntimeError: Unsupported operator: global_pool_avg

angusHeZZ avatar May 09 '20 07:05 angusHeZZ

cc @icemelon9 @kevinthesun seems to be a typo in strategy refactor? global_pool_avg

tqchen avatar May 09 '20 15:05 tqchen

ping @icemelon9

tqchen avatar May 25 '20 17:05 tqchen

@angusHeZZ Could you provide a script that can reproduce the error? I see that global_pool_avg is in the unit test, and there's no problem.

icemelon avatar Jun 08 '20 20:06 icemelon

close due to inactive status, feel free to open a new thread

tqchen avatar Jul 21 '20 00:07 tqchen