Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TOPI]fix scatterND large shape problem #12200

Merged
merged 8 commits into from
Aug 19, 2022
Merged

[TOPI]fix scatterND large shape problem #12200

merged 8 commits into from
Aug 19, 2022

Conversation

chengven027
Copy link
Contributor

test case:

def test_scatternd():
    def before():
        data = relay.const(np.zeros((1, 900, 300), dtype="float32"), dtype="float32")
        indices = relay.const(np.ones((3, 1, 900, 300), dtype="int64"), dtype="int64")
        update = relay.const(np.ones((1, 900, 300), dtype="float32"), dtype="float32")
        b = relay.op.scatter_nd(data, indices, update)
        return relay.Function(relay.analysis.free_vars(b), b)

    passes = tvm.transform.Sequential(
        [
            relay.transform.InferType(),
            relay.transform.FoldConstant(),
        ]
    )
    before_mod = tvm.IRModule.from_expr(before())
    with tvm.transform.PassContext(opt_level=3):
        after_mod = passes(before_mod)

when i run the case, I will get a Segmentation fault.
Then I remove the kind param, it can run success.
I don't know whether the kind param use 'unroll' is better.

@masahi
Copy link
Member

masahi commented Jul 27, 2022

Do you know why parallel is causing the issue?

cc @tkonolige

@tkonolige
Copy link
Contributor

Looks like this is an issue in the TVM thread pool. I ran with TVM compiled with address sanitizer and I get the following error. @tqchen I think you have the most experience here. @yidawang wrote the code but I'm not sure if they are still active in the community.

AddressSanitizer:DEADLYSIGNAL
=================================================================
==2989577==ERROR: AddressSanitizer: stack-overflow on address 0x7ffd045e9ff8 (pc 0x7fea8e370da6 bp 0x7ffd045ea840 sp 0x7ffd045ea000 T0)
    #0 0x7fea8e370da6 in __asan_memcpy (/usr/lib/llvm-12/lib/clang/12.0.0/lib/linux/libclang_rt.asan-x86_64.so+0xbdda6)
    #1 0x7fea4aa40242 in tvm::runtime::SpscTaskQueue::Enqueue(tvm::runtime::SpscTaskQueue::Task const&) /home/tristan/octoml/tvm/src/runtime/thread_pool.cc:221:21
    #2 0x7fea4aa40242 in tvm::runtime::SpscTaskQueue::Push(tvm::runtime::SpscTaskQueue::Task const&) /home/tristan/octoml/tvm/src/runtime/thread_pool.cc:163:13
    #3 0x7fea4aa3d5ab in tvm::runtime::ThreadPool::Launch(int (*)(int, TVMParallelGroupEnv*, void*), void*, int, int) /home/tristan/octoml/tvm/src/runtime/thread_pool.cc:305:19
    #4 0x7fea4aa399f9 in TVMBackendParallelLaunch /home/tristan/octoml/tvm/src/runtime/thread_pool.cc:486:56
    #5 0x7fea6606c69a  (<unknown module>)
    #6 0x7fea4a95329c in tvm::runtime::WrapPackedFunc(int (*)(TVMValue*, int*, int, TVMValue*, int*, void*), tvm::runtime::ObjectPtr<tvm::runtime::Object> const&)::$_0::operator()(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const /home/tristan/octoml/tvm/src/runtime/library_module.cc:78:15
    #7 0x7fea4a95329c in tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<tvm::runtime::WrapPackedFunc(int (*)(TVMValue*, int*, int, TVMValue*, int*, void*), tvm::runtime::ObjectPtr<tvm::runtime::Object> const&)::$_0> >::Call(tvm::runtime::PackedFuncObj const*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1213:3
    #8 0x7fea49fc4d8e in tvm::runtime::PackedFuncObj::CallPacked(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1217:3
    #9 0x7fea49fc4d8e in tvm::runtime::PackedFunc::CallPacked(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1221:47
    #10 0x7fea49fc4d8e in tvm::relay::Interpreter::InvokePrimitiveOp(tvm::GlobalVar const&, tvm::runtime::Array<tvm::GlobalVar, void>, tvm::Target, tvm::GlobalVar const&, tvm::runtime::Array<tvm::GlobalVar, void> const&, tvm::runtime::Array<tvm::Integer, void> const&, unsigned long, unsigned long, tvm::Target, std::vector<tvm::runtime::ObjectRef, std::allocator<tvm::runtime::ObjectRef> > const&) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:646:17
    #11 0x7fea49fadff9 in tvm::relay::Interpreter::VisitExpr_(tvm::relay::CallNode const*) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:755:14
    #12 0x7fea49fbfe05 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda4'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:128:5
    #13 0x7fea49fbfe05 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda4'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::__invoke(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:128:5
    #14 0x7fea49fba87c in tvm::NodeFunctor<tvm::runtime::ObjectRef (tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)>::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/node/functor.h:97:12
    #15 0x7fea49fa9594 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:95:12
    #16 0x7fea49fabb6f in tvm::relay::Interpreter::Eval(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:316:45
    #17 0x7fea49fabb6f in tvm::relay::Interpreter::VisitExpr_(tvm::relay::CallNode const*) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:763:24
    #18 0x7fea49fbfe05 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda4'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:128:5
    #19 0x7fea49fbfe05 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda4'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::__invoke(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:128:5
    #20 0x7fea49fba87c in tvm::NodeFunctor<tvm::runtime::ObjectRef (tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)>::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/node/functor.h:97:12
    #21 0x7fea49fa9594 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:95:12
    #22 0x7fea49fb2cb5 in tvm::relay::Interpreter::Eval(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:316:45
    #23 0x7fea49fb2cb5 in tvm::relay::Interpreter::VisitExpr_(tvm::relay::LetNode const*) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:807:20
    #24 0x7fea49fbfe75 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda5'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:129:5
    #25 0x7fea49fbfe75 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda5'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::__invoke(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:129:5
    #26 0x7fea49fba87c in tvm::NodeFunctor<tvm::runtime::ObjectRef (tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)>::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/node/functor.h:97:12
    #27 0x7fea49fa9594 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:95:12
    #28 0x7fea49fb2e7a in tvm::relay::Interpreter::Eval(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:316:45
    #29 0x7fea49fb2e7a in tvm::relay::Interpreter::VisitExpr_(tvm::relay::LetNode const*) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:811:12
    #30 0x7fea49fbfe75 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda5'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:129:5
    #31 0x7fea49fbfe75 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda5'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::__invoke(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:129:5
    #32 0x7fea49fba87c in tvm::NodeFunctor<tvm::runtime::ObjectRef (tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)>::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/node/functor.h:97:12
    #33 0x7fea49fa9594 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:95:12
    #34 0x7fea49fb2e7a in tvm::relay::Interpreter::Eval(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:316:45
    #35 0x7fea49fb2e7a in tvm::relay::Interpreter::VisitExpr_(tvm::relay::LetNode const*) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:811:12
    #36 0x7fea49fbfe75 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda5'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:129:5
    #37 0x7fea49fbfe75 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda5'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::__invoke(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:129:5
    #38 0x7fea49fba87c in tvm::NodeFunctor<tvm::runtime::ObjectRef (tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)>::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/node/functor.h:97:12
    #39 0x7fea49fa9594 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:95:12
    #40 0x7fea49fb2e7a in tvm::relay::Interpreter::Eval(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:316:45
    #41 0x7fea49fb2e7a in tvm::relay::Interpreter::VisitExpr_(tvm::relay::LetNode const*) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:811:12
    #42 0x7fea49fbfe75 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda5'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:129:5
    #43 0x7fea49fbfe75 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda5'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::__invoke(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:129:5
    #44 0x7fea49fba87c in tvm::NodeFunctor<tvm::runtime::ObjectRef (tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)>::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/node/functor.h:97:12
    #45 0x7fea49fa9594 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:95:12
    #46 0x7fea49fda720 in tvm::relay::Interpreter::Eval(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:316:45
    #47 0x7fea49fda720 in tvm::relay::Interpreter::Invoke(tvm::relay::InterpreterClosure const&, tvm::runtime::Array<tvm::runtime::ObjectRef, void> const&, tvm::relay::Var const&)::'lambda'()::operator()() const /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:700:63
    #48 0x7fea49fda720 in tvm::runtime::ObjectRef std::__invoke_impl<tvm::runtime::ObjectRef, tvm::relay::Interpreter::Invoke(tvm::relay::InterpreterClosure const&, tvm::runtime::Array<tvm::runtime::ObjectRef, void> const&, tvm::relay::Var const&)::'lambda'()&>(std::__invoke_other, tvm::relay::Interpreter::Invoke(tvm::relay::InterpreterClosure const&, tvm::runtime::Array<tvm::runtime::ObjectRef, void> const&, tvm::relay::Var const&)::'lambda'()&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/invoke.h:60:14
    #49 0x7fea49fda720 in std::enable_if<__and_<std::__not_<std::is_void<tvm::runtime::ObjectRef> >, std::is_convertible<std::__invoke_result<tvm::relay::Interpreter::Invoke(tvm::relay::InterpreterClosure const&, tvm::runtime::Array<tvm::runtime::ObjectRef, void> const&, tvm::relay::Var const&)::'lambda'()&>::type, tvm::runtime::ObjectRef> >::value, tvm::runtime::ObjectRef>::type std::__invoke_r<tvm::runtime::ObjectRef, tvm::relay::Interpreter::Invoke(tvm::relay::InterpreterClosure const&, tvm::runtime::Array<tvm::runtime::ObjectRef, void> const&, tvm::relay::Var const&)::'lambda'()&>(tvm::relay::Interpreter::Invoke(tvm::relay::InterpreterClosure const&, tvm::runtime::Array<tvm::runtime::ObjectRef, void> const&, tvm::relay::Var const&)::'lambda'()&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/invoke.h:141:14
    #50 0x7fea49fda720 in std::_Function_handler<tvm::runtime::ObjectRef (), tvm::relay::Interpreter::Invoke(tvm::relay::InterpreterClosure const&, tvm::runtime::Array<tvm::runtime::ObjectRef, void> const&, tvm::relay::Var const&)::'lambda'()>::_M_invoke(std::_Any_data const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/std_function.h:291:9
    #51 0x7fea49fd9260 in std::function<tvm::runtime::ObjectRef ()>::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/std_function.h:622:14
    #52 0x7fea49fd9260 in tvm::runtime::ObjectRef tvm::relay::Interpreter::WithFrame<tvm::runtime::ObjectRef>(tvm::relay::Frame const&, std::function<tvm::runtime::ObjectRef ()> const&) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:309:12
    #53 0x7fea49fc9f22 in tvm::relay::Interpreter::Invoke(tvm::relay::InterpreterClosure const&, tvm::runtime::Array<tvm::runtime::ObjectRef, void> const&, tvm::relay::Var const&) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:700:12
    #54 0x7fea49fac531 in tvm::relay::Interpreter::VisitExpr_(tvm::relay::CallNode const*) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:791:16
    #55 0x7fea49fbfe05 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda4'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:128:5
    #56 0x7fea49fbfe05 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda4'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::__invoke(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:128:5
    #57 0x7fea49fba87c in tvm::NodeFunctor<tvm::runtime::ObjectRef (tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)>::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/node/functor.h:97:12
    #58 0x7fea49fa9594 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:95:12
    #59 0x7fea49f9a9e4 in tvm::relay::Interpreter::Eval(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:316:45
    #60 0x7fea49f9a9e4 in tvm::relay::Eval(tvm::RelayExpr, tvm::runtime::Map<tvm::GlobalTypeVar, tvm::TypeData, void, void>, std::unordered_set<tvm::runtime::String, std::hash<tvm::runtime::String>, std::equal_to<tvm::runtime::String>, std::allocator<tvm::runtime::String> >, DLDevice, tvm::Target, tvm::runtime::Map<tvm::runtime::String, tvm::runtime::ObjectRef, void, void>) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:1126:16
    #61 0x7fea49a28665 in tvm::relay::transform::(anonymous namespace)::ConstantFolder::ConstEvaluate(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/transforms/fold_constant.cc:271:32
    #62 0x7fea49a21d1e in tvm::relay::transform::(anonymous namespace)::ConstantFolder::Rewrite_(tvm::relay::CallNode const*, tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/transforms/fold_constant.cc:202:12
    #63 0x7fea497ef13b in tvm::RelayExpr tvm::relay::MixedModeMutator::Rewrite<tvm::relay::CallNode>(tvm::relay::CallNode const*) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:313:12
    #64 0x7fea497eec68 in tvm::relay::MixedModeMutator::VisitExpr_(tvm::relay::CallNode const*) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:291:61
    #65 0x7fea49b83825 in tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>::InitVTable()::'lambda4'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*)::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:128:5
    #66 0x7fea49b83825 in tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>::InitVTable()::'lambda4'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*)::__invoke(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:128:5
    #67 0x7fea49b7e29c in tvm::NodeFunctor<tvm::RelayExpr (tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*)>::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/node/functor.h:97:12
    #68 0x7fea49b7dc84 in tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:95:12
    #69 0x7fea4a2f9efa in tvm::relay::ExprMutator::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/ir/expr_functor.cc:158:34
    #70 0x7fea4a2f9cd8 in tvm::relay::MixedModeMutator::DispatchVisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/ir/expr_functor.cc:94:82
    #71 0x7fea4a2f978f in tvm::relay::MixedModeMutator::VisitLeaf(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/ir/expr_functor.cc:81:22
    #72 0x7fea4a2faa7e in tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_3::operator()(tvm::RelayExpr const&) const /home/tristan/octoml/tvm/src/relay/ir/expr_functor.cc:98:62
    #73 0x7fea4a2faa7e in void tvm::relay::ExpandDataflow<tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_2, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_3, void tvm::relay::ExpandDataflow<tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_2, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_3>(tvm::RelayExpr, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_2, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_3)::'lambda'(tvm::RelayExpr const&)>(tvm::RelayExpr, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_2, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_3, void tvm::relay::ExpandDataflow<tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_2, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_3>(tvm::RelayExpr, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_2, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_3)::'lambda'(tvm::RelayExpr const&)) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:468:7
    #74 0x7fea4a2faa7e in void tvm::relay::ExpandDataflow<tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_2, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_3>(tvm::RelayExpr, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_2, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_3) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:509:3
    #75 0x7fea4a2faa7e in tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/ir/expr_functor.cc:102:5
    #76 0x7fea4a3000a6 in tvm::relay::ExprMutator::Mutate(tvm::RelayExpr const&) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:190:48
    #77 0x7fea4a3000a6 in tvm::relay::ExprMutator::VisitExpr_(tvm::relay::FunctionNode const*) /home/tristan/octoml/tvm/src/relay/ir/expr_functor.cc:204:21
    #78 0x7fea49a1c9c2 in tvm::relay::transform::(anonymous namespace)::ConstantFolder::VisitExpr_(tvm::relay::FunctionNode const*) /home/tristan/octoml/tvm/src/relay/transforms/fold_constant.cc:143:27
    #79 0x7fea49b837b5 in tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>::InitVTable()::'lambda3'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*)::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:127:5
    #80 0x7fea49b837b5 in tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>::InitVTable()::'lambda3'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*)::__invoke(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:127:5
    #81 0x7fea49b7e29c in tvm::NodeFunctor<tvm::RelayExpr (tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*)>::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/node/functor.h:97:12
    #82 0x7fea49b7dc84 in tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:95:12
    #83 0x7fea4a2f9efa in tvm::relay::ExprMutator::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/ir/expr_functor.cc:158:34
    #84 0x7fea4a2f9cd8 in tvm::relay::MixedModeMutator::DispatchVisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/ir/expr_functor.cc:94:82
    #85 0x7fea4a2f978f in tvm::relay::MixedModeMutator::VisitLeaf(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/ir/expr_functor.cc:81:22
    #86 0x7fea4a2faa7e in tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_3::operator()(tvm::RelayExpr const&) const /home/tristan/octoml/tvm/src/relay/ir/expr_functor.cc:98:62
    #87 0x7fea4a2faa7e in void tvm::relay::ExpandDataflow<tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_2, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_3, void tvm::relay::ExpandDataflow<tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_2, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_3>(tvm::RelayExpr, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_2, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_3)::'lambda'(tvm::RelayExpr const&)>(tvm::RelayExpr, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_2, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_3, void tvm::relay::ExpandDataflow<tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_2, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_3>(tvm::RelayExpr, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_2, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_3)::'lambda'(tvm::RelayExpr const&)) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:468:7
    #88 0x7fea4a2faa7e in void tvm::relay::ExpandDataflow<tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_2, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_3>(tvm::RelayExpr, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_2, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_3) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:509:3
    #89 0x7fea4a2faa7e in tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/ir/expr_functor.cc:102:5
    #90 0x7fea49a1b1ba in tvm::relay::transform::FoldConstantExpr(tvm::RelayExpr const&, tvm::IRModule const&, bool) /home/tristan/octoml/tvm/src/relay/transforms/fold_constant.cc:432:47
    #91 0x7fea49a2de90 in tvm::relay::transform::FoldConstant(bool)::$_0::operator()(tvm::relay::Function, tvm::IRModule, tvm::transform::PassContext) const /home/tristan/octoml/tvm/src/relay/transforms/fold_constant.cc:442:35
    #92 0x7fea49a2de90 in void tvm::runtime::detail::unpack_call_dispatcher<tvm::relay::Function, 0, 3, tvm::relay::transform::FoldConstant(bool)::$_0>::run<tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (*)(), tvm::relay::transform::FoldConstant(bool)::$_0 const&, tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*, tvm::runtime::TVMMovableArgValueWithContext_&&, tvm::runtime::TVMMovableArgValueWithContext_&&, tvm::runtime::TVMMovableArgValueWithContext_&&) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1646:13
    #93 0x7fea49a2de90 in void tvm::runtime::detail::unpack_call_dispatcher<tvm::relay::Function, 1, 2, tvm::relay::transform::FoldConstant(bool)::$_0>::run<tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (*)(), tvm::relay::transform::FoldConstant(bool)::$_0 const&, tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*, tvm::runtime::TVMMovableArgValueWithContext_&&, tvm::runtime::TVMMovableArgValueWithContext_&&) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1631:5
    #94 0x7fea49a2de90 in void tvm::runtime::detail::unpack_call_dispatcher<tvm::relay::Function, 2, 1, tvm::relay::transform::FoldConstant(bool)::$_0>::run<tvm::runtime::TVMMovableArgValueWithContext_>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (*)(), tvm::relay::transform::FoldConstant(bool)::$_0 const&, tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*, tvm::runtime::TVMMovableArgValueWithContext_&&) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1631:5
    #95 0x7fea49a2de90 in void tvm::runtime::detail::unpack_call_dispatcher<tvm::relay::Function, 3, 0, tvm::relay::transform::FoldConstant(bool)::$_0>::run<>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (*)(), tvm::relay::transform::FoldConstant(bool)::$_0 const&, tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1631:5
    #96 0x7fea49a2de90 in void tvm::runtime::detail::unpack_call<tvm::relay::Function, 3, tvm::relay::transform::FoldConstant(bool)::$_0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, tvm::relay::transform::FoldConstant(bool)::$_0 const&, tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1671:3
    #97 0x7fea49a2de90 in void tvm::runtime::TypedPackedFunc<tvm::relay::Function (tvm::relay::Function, tvm::IRModule, tvm::transform::PassContext)>::AssignTypedLambda<tvm::relay::transform::FoldConstant(bool)::$_0>(tvm::relay::transform::FoldConstant(bool)::$_0)::'lambda'(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)::operator()(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*) const /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1744:5
    #98 0x7fea49a2de90 in tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<void tvm::runtime::TypedPackedFunc<tvm::relay::Function (tvm::relay::Function, tvm::IRModule, tvm::transform::PassContext)>::AssignTypedLambda<tvm::relay::transform::FoldConstant(bool)::$_0>(tvm::relay::transform::FoldConstant(bool)::$_0)::'lambda'(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)> >::Call(tvm::runtime::PackedFuncObj const*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1213:3
    #99 0x7fea4a37f0c8 in tvm::runtime::PackedFuncObj::CallPacked(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1217:3
    #100 0x7fea4a37f0c8 in tvm::runtime::TVMRetValue tvm::runtime::PackedFunc::operator()<tvm::relay::Function, tvm::IRModule, tvm::transform::PassContext>(tvm::relay::Function&&, tvm::IRModule&&, tvm::transform::PassContext&&) const /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1618:9
    #101 0x7fea4a37f0c8 in tvm::relay::Function tvm::runtime::detail::typed_packed_call_dispatcher<tvm::relay::Function>::run<tvm::relay::Function, tvm::IRModule, tvm::transform::PassContext>(tvm::runtime::PackedFunc const&, tvm::relay::Function&&, tvm::IRModule&&, tvm::transform::PassContext&&) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1694:12
    #102 0x7fea4a37f0c8 in tvm::runtime::TypedPackedFunc<tvm::relay::Function (tvm::relay::Function, tvm::IRModule, tvm::transform::PassContext)>::operator()(tvm::relay::Function, tvm::IRModule, tvm::transform::PassContext) const /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1750:10
    #103 0x7fea4a37f0c8 in tvm::relay::transform::FunctionPassNode::operator()(tvm::IRModule, tvm::transform::PassContext const&) const /home/tristan/octoml/tvm/src/relay/ir/transform.cc:133:31
    #104 0x7fea45d77f55 in tvm::transform::Pass::operator()(tvm::IRModule, tvm::transform::PassContext const&) const /home/tristan/octoml/tvm/src/ir/transform.cc:274:17
    #105 0x7fea45d7eb78 in tvm::transform::SequentialNode::operator()(tvm::IRModule, tvm::transform::PassContext const&) const /home/tristan/octoml/tvm/src/ir/transform.cc:453:11
    #106 0x7fea45d77f55 in tvm::transform::Pass::operator()(tvm::IRModule, tvm::transform::PassContext const&) const /home/tristan/octoml/tvm/src/ir/transform.cc:274:17
    #107 0x7fea45d772bf in tvm::transform::Pass::operator()(tvm::IRModule) const /home/tristan/octoml/tvm/src/ir/transform.cc:258:16
    #108 0x7fea45d88d86 in tvm::transform::$_6::operator()(tvm::transform::Pass, tvm::IRModule) const /home/tristan/octoml/tvm/src/ir/transform.cc:501:10
    #109 0x7fea45d88d86 in void tvm::runtime::detail::unpack_call_dispatcher<tvm::IRModule, 0, 2, tvm::transform::$_6>::run<tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (*)(), tvm::transform::$_6 const&, tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*, tvm::runtime::TVMMovableArgValueWithContext_&&, tvm::runtime::TVMMovableArgValueWithContext_&&) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1646:13
    #110 0x7fea45d88d86 in void tvm::runtime::detail::unpack_call_dispatcher<tvm::IRModule, 1, 1, tvm::transform::$_6>::run<tvm::runtime::TVMMovableArgValueWithContext_>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (*)(), tvm::transform::$_6 const&, tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*, tvm::runtime::TVMMovableArgValueWithContext_&&) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1631:5
    #111 0x7fea45d88d86 in void tvm::runtime::detail::unpack_call_dispatcher<tvm::IRModule, 2, 0, tvm::transform::$_6>::run<>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (*)(), tvm::transform::$_6 const&, tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1631:5
    #112 0x7fea45d88d86 in void tvm::runtime::detail::unpack_call<tvm::IRModule, 2, tvm::transform::$_6>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, tvm::transform::$_6 const&, tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1671:3
    #113 0x7fea45d88d86 in void tvm::runtime::TypedPackedFunc<tvm::IRModule (tvm::transform::Pass, tvm::IRModule)>::AssignTypedLambda<tvm::transform::$_6>(tvm::transform::$_6, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::'lambda'(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)::operator()(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*) const /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1731:5
    #114 0x7fea45d88d86 in tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<void tvm::runtime::TypedPackedFunc<tvm::IRModule (tvm::transform::Pass, tvm::IRModule)>::AssignTypedLambda<tvm::transform::$_6>(tvm::transform::$_6, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::'lambda'(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)> >::Call(tvm::runtime::PackedFuncObj const*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1213:3
    #115 0x7fea4a909272 in tvm::runtime::PackedFuncObj::CallPacked(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1217:3
    #116 0x7fea4a909272 in TVMFuncCall /home/tristan/octoml/tvm/src/runtime/c_runtime_api.cc:477:9
    #117 0x7fea661db71f in __pyx_f_3tvm_4_ffi_4_cy3_4core_FuncCall3 /home/tristan/octoml/tvm/python/tvm/_ffi/_cython/core.cpp:7434:45
    #118 0x7fea661db71f in __pyx_f_3tvm_4_ffi_4_cy3_4core_FuncCall(void*, _object*, TVMValue*, int*) /home/tristan/octoml/tvm/python/tvm/_ffi/_cython/core.cpp:7556:57
    #119 0x7fea661dc029 in __pyx_pf_3tvm_4_ffi_4_cy3_4core_14PackedFuncBase_4__call__ /home/tristan/octoml/tvm/python/tvm/_ffi/_cython/core.cpp:8495:54
    #120 0x7fea661dc029 in __pyx_pw_3tvm_4_ffi_4_cy3_4core_14PackedFuncBase_5__call__(_object*, _object*, _object*) /home/tristan/octoml/tvm/python/tvm/_ffi/_cython/core.cpp:8459:71
    #121 0x55ee9fca364a in _PyObject_MakeTpCall /home/tristan/code/Python-3.8.12/Objects/call.c:159:18
    #122 0x55ee9fd037fa in _PyObject_Vectorcall /home/tristan/code/Python-3.8.12/./Include/cpython/abstract.h:125:16
    #123 0x55ee9fd037fa in _PyObject_Vectorcall /home/tristan/code/Python-3.8.12/./Include/cpython/abstract.h:115:1
    #124 0x55ee9fd037fa in call_function /home/tristan/code/Python-3.8.12/Python/ceval.c:4963:13
    #125 0x55ee9fd037fa in _PyEval_EvalFrameDefault /home/tristan/code/Python-3.8.12/Python/ceval.c:3469:23
    #126 0x55ee9fca4d29 in function_code_fastcall /home/tristan/code/Python-3.8.12/Objects/call.c:284:14
    #127 0x55ee9fca4d29 in _PyFunction_Vectorcall /home/tristan/code/Python-3.8.12/Objects/call.c:411:20
    #128 0x55ee9fca4d29 in _PyObject_FastCallDict /home/tristan/code/Python-3.8.12/Objects/call.c:96:15
    #129 0x55ee9fca4d29 in _PyObject_Call_Prepend /home/tristan/code/Python-3.8.12/Objects/call.c:888:14
    #130 0x55ee9fd66c2c in slot_tp_call /home/tristan/code/Python-3.8.12/Objects/typeobject.c:6556:15
    #131 0x55ee9fca364a in _PyObject_MakeTpCall /home/tristan/code/Python-3.8.12/Objects/call.c:159:18
    #132 0x55ee9fd0337b in _PyObject_Vectorcall /home/tristan/code/Python-3.8.12/./Include/cpython/abstract.h:125:16
    #133 0x55ee9fd0337b in _PyObject_Vectorcall /home/tristan/code/Python-3.8.12/./Include/cpython/abstract.h:115:1
    #134 0x55ee9fd0337b in call_function /home/tristan/code/Python-3.8.12/Python/ceval.c:4963:13
    #135 0x55ee9fd0337b in _PyEval_EvalFrameDefault /home/tristan/code/Python-3.8.12/Python/ceval.c:3500:19
    #136 0x55ee9fcfdd9c in PyEval_EvalFrameEx /home/tristan/code/Python-3.8.12/Python/ceval.c:741:12
    #137 0x55ee9fcfdd9c in _PyEval_EvalCodeWithName /home/tristan/code/Python-3.8.12/Python/ceval.c:4298:14
    #138 0x55ee9fd755a6 in PyEval_EvalCodeEx /home/tristan/code/Python-3.8.12/Python/ceval.c:4327:12
    #139 0x55ee9fd755a6 in PyEval_EvalCode /home/tristan/code/Python-3.8.12/Python/ceval.c:718:12
    #140 0x55ee9fd85442 in run_eval_code_obj /home/tristan/code/Python-3.8.12/Python/pythonrun.c:1166:9
    #141 0x55ee9fd853e2 in run_mod /home/tristan/code/Python-3.8.12/Python/pythonrun.c:1188:9
    #142 0x55ee9fc475e3 in pyrun_file /home/tristan/code/Python-3.8.12/Python/pythonrun.c:1085:15
    #143 0x55ee9fc46a80 in pyrun_simple_file /home/tristan/code/Python-3.8.12/Python/pythonrun.c:439:13
    #144 0x55ee9fc46a80 in PyRun_SimpleFileExFlags /home/tristan/code/Python-3.8.12/Python/pythonrun.c:472:15
    #145 0x55ee9fd51847 in pymain_run_file /home/tristan/code/Python-3.8.12/Modules/main.c:385:15
    #146 0x55ee9fd51847 in pymain_run_python /home/tristan/code/Python-3.8.12/Modules/main.c:610:21
    #147 0x55ee9fd51847 in Py_RunMain /home/tristan/code/Python-3.8.12/Modules/main.c:689:5
    #148 0x55ee9fd511cc in Py_BytesMain /home/tristan/code/Python-3.8.12/Modules/main.c:743:12
    #149 0x7fea8df5a564 in __libc_start_main csu/../csu/libc-start.c:332:16
    #150 0x55ee9fd510cd in _start (/usr/local/bin/python3.8+0x1b50cd)

SUMMARY: AddressSanitizer: stack-overflow (/usr/lib/llvm-12/lib/clang/12.0.0/lib/linux/libclang_rt.asan-x86_64.so+0xbdda6) in __asan_memcpy
==2989577==ABORTING

@tqchen
Copy link
Member

tqchen commented Jul 28, 2022

Would be good to know why. To see if it is an issue with particular thread pool, we can try to switch to openmp https://github.com/apache/tvm/blob/main/cmake/config.cmake#L178

@tkonolige
Copy link
Contributor

It also errors with the openmp thread pool:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==3061121==ERROR: AddressSanitizer: stack-overflow on address 0x7ffded1e9fe8 (pc 0x7f3c9629dbb5 bp 0x7f3c8ba3cef8 sp 0x7ffded1e9fe0 T0)
    #0 0x7f3c9629dbb5  (/lib64/ld-linux-x86-64.so.2+0x14bb5)
    #1 0x7f3c9629ddab  (/lib64/ld-linux-x86-64.so.2+0x14dab)
    #2 0x7f3c962a474b in __tls_get_addr (/lib64/ld-linux-x86-64.so.2+0x1b74b)
    #3 0x7f3c958e36c7 in __tls_get_addr (/usr/lib/llvm-12/lib/clang/12.0.0/lib/linux/libclang_rt.asan-x86_64.so+0x866c7)
    #4 0x7f3c8b97f279  (/lib/x86_64-linux-gnu/libomp.so.5+0x35279)
    #5 0x7f3c8b9b882e  (/lib/x86_64-linux-gnu/libomp.so.5+0x6e82e)
    #6 0x7f3c8b9b411d  (/lib/x86_64-linux-gnu/libomp.so.5+0x6a11d)
    #7 0x7f3c8b9b7b1d  (/lib/x86_64-linux-gnu/libomp.so.5+0x6db1d)
    #8 0x7f3c8b9855c1 in __kmp_fork_call (/lib/x86_64-linux-gnu/libomp.so.5+0x3b5c1)
    #9 0x7f3c8b973eea in __kmpc_fork_call (/lib/x86_64-linux-gnu/libomp.so.5+0x29eea)
    #10 0x7f3c51fcaed4 in TVMBackendParallelLaunch /home/tristan/octoml/tvm/src/runtime/thread_pool.cc:491:1
    #11 0x7f3c7f6b569a  (<unknown module>)
    #12 0x7f3c51ee426c in tvm::runtime::WrapPackedFunc(int (*)(TVMValue*, int*, int, TVMValue*, int*, void*), tvm::runtime::ObjectPtr<tvm::runtime::Object> const&)::$_0::operator()(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const /home/tristan/octoml/tvm/src/runtime/library_module.cc:78:15
    #13 0x7f3c51ee426c in tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<tvm::runtime::WrapPackedFunc(int (*)(TVMValue*, int*, int, TVMValue*, int*, void*), tvm::runtime::ObjectPtr<tvm::runtime::Object> const&)::$_0> >::Call(tvm::runtime::PackedFuncObj const*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1213:3
    #14 0x7f3c51555eae in tvm::runtime::PackedFuncObj::CallPacked(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1217:3
    #15 0x7f3c51555eae in tvm::runtime::PackedFunc::CallPacked(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1221:47
    #16 0x7f3c51555eae in tvm::relay::Interpreter::InvokePrimitiveOp(tvm::GlobalVar const&, tvm::runtime::Array<tvm::GlobalVar, void>, tvm::Target, tvm::GlobalVar const&, tvm::runtime::Array<tvm::GlobalVar, void> const&, tvm::runtime::Array<tvm::Integer, void> const&, unsigned long, unsigned long, tvm::Target, std::vector<tvm::runtime::ObjectRef, std::allocator<tvm::runtime::ObjectRef> > const&) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:646:17
    #17 0x7f3c5153f119 in tvm::relay::Interpreter::VisitExpr_(tvm::relay::CallNode const*) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:755:14
    #18 0x7f3c51550f25 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda4'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:128:5
    #19 0x7f3c51550f25 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda4'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::__invoke(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:128:5
    #20 0x7f3c5154b99c in tvm::NodeFunctor<tvm::runtime::ObjectRef (tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)>::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/node/functor.h:97:12
    #21 0x7f3c5153a6b4 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:95:12
    #22 0x7f3c5153cc8f in tvm::relay::Interpreter::Eval(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:316:45
    #23 0x7f3c5153cc8f in tvm::relay::Interpreter::VisitExpr_(tvm::relay::CallNode const*) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:763:24
    #24 0x7f3c51550f25 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda4'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:128:5
    #25 0x7f3c51550f25 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda4'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::__invoke(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:128:5
    #26 0x7f3c5154b99c in tvm::NodeFunctor<tvm::runtime::ObjectRef (tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)>::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/node/functor.h:97:12
    #27 0x7f3c5153a6b4 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:95:12
    #28 0x7f3c51543dd5 in tvm::relay::Interpreter::Eval(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:316:45
    #29 0x7f3c51543dd5 in tvm::relay::Interpreter::VisitExpr_(tvm::relay::LetNode const*) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:807:20
    #30 0x7f3c51550f95 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda5'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:129:5
    #31 0x7f3c51550f95 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda5'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::__invoke(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:129:5
    #32 0x7f3c5154b99c in tvm::NodeFunctor<tvm::runtime::ObjectRef (tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)>::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/node/functor.h:97:12
    #33 0x7f3c5153a6b4 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:95:12
    #34 0x7f3c51543f9a in tvm::relay::Interpreter::Eval(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:316:45
    #35 0x7f3c51543f9a in tvm::relay::Interpreter::VisitExpr_(tvm::relay::LetNode const*) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:811:12
    #36 0x7f3c51550f95 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda5'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:129:5
    #37 0x7f3c51550f95 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda5'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::__invoke(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:129:5
    #38 0x7f3c5154b99c in tvm::NodeFunctor<tvm::runtime::ObjectRef (tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)>::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/node/functor.h:97:12
    #39 0x7f3c5153a6b4 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:95:12
    #40 0x7f3c51543f9a in tvm::relay::Interpreter::Eval(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:316:45
    #41 0x7f3c51543f9a in tvm::relay::Interpreter::VisitExpr_(tvm::relay::LetNode const*) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:811:12
    #42 0x7f3c51550f95 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda5'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:129:5
    #43 0x7f3c51550f95 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda5'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::__invoke(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:129:5
    #44 0x7f3c5154b99c in tvm::NodeFunctor<tvm::runtime::ObjectRef (tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)>::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/node/functor.h:97:12
    #45 0x7f3c5153a6b4 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:95:12
    #46 0x7f3c51543f9a in tvm::relay::Interpreter::Eval(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:316:45
    #47 0x7f3c51543f9a in tvm::relay::Interpreter::VisitExpr_(tvm::relay::LetNode const*) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:811:12
    #48 0x7f3c51550f95 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda5'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:129:5
    #49 0x7f3c51550f95 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda5'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::__invoke(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:129:5
    #50 0x7f3c5154b99c in tvm::NodeFunctor<tvm::runtime::ObjectRef (tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)>::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/node/functor.h:97:12
    #51 0x7f3c5153a6b4 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:95:12
    #52 0x7f3c5156b840 in tvm::relay::Interpreter::Eval(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:316:45
    #53 0x7f3c5156b840 in tvm::relay::Interpreter::Invoke(tvm::relay::InterpreterClosure const&, tvm::runtime::Array<tvm::runtime::ObjectRef, void> const&, tvm::relay::Var const&)::'lambda'()::operator()() const /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:700:63
    #54 0x7f3c5156b840 in tvm::runtime::ObjectRef std::__invoke_impl<tvm::runtime::ObjectRef, tvm::relay::Interpreter::Invoke(tvm::relay::InterpreterClosure const&, tvm::runtime::Array<tvm::runtime::ObjectRef, void> const&, tvm::relay::Var const&)::'lambda'()&>(std::__invoke_other, tvm::relay::Interpreter::Invoke(tvm::relay::InterpreterClosure const&, tvm::runtime::Array<tvm::runtime::ObjectRef, void> const&, tvm::relay::Var const&)::'lambda'()&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/invoke.h:60:14
    #55 0x7f3c5156b840 in std::enable_if<__and_<std::__not_<std::is_void<tvm::runtime::ObjectRef> >, std::is_convertible<std::__invoke_result<tvm::relay::Interpreter::Invoke(tvm::relay::InterpreterClosure const&, tvm::runtime::Array<tvm::runtime::ObjectRef, void> const&, tvm::relay::Var const&)::'lambda'()&>::type, tvm::runtime::ObjectRef> >::value, tvm::runtime::ObjectRef>::type std::__invoke_r<tvm::runtime::ObjectRef, tvm::relay::Interpreter::Invoke(tvm::relay::InterpreterClosure const&, tvm::runtime::Array<tvm::runtime::ObjectRef, void> const&, tvm::relay::Var const&)::'lambda'()&>(tvm::relay::Interpreter::Invoke(tvm::relay::InterpreterClosure const&, tvm::runtime::Array<tvm::runtime::ObjectRef, void> const&, tvm::relay::Var const&)::'lambda'()&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/invoke.h:141:14
    #56 0x7f3c5156b840 in std::_Function_handler<tvm::runtime::ObjectRef (), tvm::relay::Interpreter::Invoke(tvm::relay::InterpreterClosure const&, tvm::runtime::Array<tvm::runtime::ObjectRef, void> const&, tvm::relay::Var const&)::'lambda'()>::_M_invoke(std::_Any_data const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/std_function.h:291:9
    #57 0x7f3c5156a380 in std::function<tvm::runtime::ObjectRef ()>::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/std_function.h:622:14
    #58 0x7f3c5156a380 in tvm::runtime::ObjectRef tvm::relay::Interpreter::WithFrame<tvm::runtime::ObjectRef>(tvm::relay::Frame const&, std::function<tvm::runtime::ObjectRef ()> const&) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:309:12
    #59 0x7f3c5155b042 in tvm::relay::Interpreter::Invoke(tvm::relay::InterpreterClosure const&, tvm::runtime::Array<tvm::runtime::ObjectRef, void> const&, tvm::relay::Var const&) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:700:12
    #60 0x7f3c5153d651 in tvm::relay::Interpreter::VisitExpr_(tvm::relay::CallNode const*) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:791:16
    #61 0x7f3c51550f25 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda4'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:128:5
    #62 0x7f3c51550f25 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::InitVTable()::'lambda4'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)::__invoke(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:128:5
    #63 0x7f3c5154b99c in tvm::NodeFunctor<tvm::runtime::ObjectRef (tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*)>::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/node/functor.h:97:12
    #64 0x7f3c5153a6b4 in tvm::relay::ExprFunctor<tvm::runtime::ObjectRef (tvm::RelayExpr const&)>::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:95:12
    #65 0x7f3c5152c3a4 in tvm::relay::Interpreter::Eval(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:316:45
    #66 0x7f3c5152c3a4 in tvm::relay::Eval(tvm::RelayExpr, tvm::runtime::Map<tvm::GlobalTypeVar, tvm::TypeData, void, void>, std::unordered_set<tvm::runtime::String, std::hash<tvm::runtime::String>, std::equal_to<tvm::runtime::String>, std::allocator<tvm::runtime::String> >, DLDevice, tvm::Target, tvm::runtime::Map<tvm::runtime::String, tvm::runtime::ObjectRef, void, void>) /home/tristan/octoml/tvm/src/relay/backend/interpreter.cc:1126:16
    #67 0x7f3c50fb9665 in tvm::relay::transform::(anonymous namespace)::ConstantFolder::ConstEvaluate(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/transforms/fold_constant.cc:271:32
    #68 0x7f3c50fb2d1e in tvm::relay::transform::(anonymous namespace)::ConstantFolder::Rewrite_(tvm::relay::CallNode const*, tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/transforms/fold_constant.cc:202:12
    #69 0x7f3c50d8013b in tvm::RelayExpr tvm::relay::MixedModeMutator::Rewrite<tvm::relay::CallNode>(tvm::relay::CallNode const*) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:313:12
    #70 0x7f3c50d7fc68 in tvm::relay::MixedModeMutator::VisitExpr_(tvm::relay::CallNode const*) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:291:61
    #71 0x7f3c51114835 in tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>::InitVTable()::'lambda4'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*)::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:128:5
    #72 0x7f3c51114835 in tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>::InitVTable()::'lambda4'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*)::__invoke(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:128:5
    #73 0x7f3c5110f2ac in tvm::NodeFunctor<tvm::RelayExpr (tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*)>::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/node/functor.h:97:12
    #74 0x7f3c5110ec94 in tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:95:12
    #75 0x7f3c51887bda in tvm::relay::ExprMutator::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/ir/expr_functor.cc:158:34
    #76 0x7f3c518879b8 in tvm::relay::MixedModeMutator::DispatchVisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/ir/expr_functor.cc:94:82
    #77 0x7f3c5188746f in tvm::relay::MixedModeMutator::VisitLeaf(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/ir/expr_functor.cc:81:22
    #78 0x7f3c5188875e in tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_1::operator()(tvm::RelayExpr const&) const /home/tristan/octoml/tvm/src/relay/ir/expr_functor.cc:98:62
    #79 0x7f3c5188875e in void tvm::relay::ExpandDataflow<tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_0, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_1, void tvm::relay::ExpandDataflow<tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_0, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_1>(tvm::RelayExpr, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_0, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_1)::'lambda'(tvm::RelayExpr const&)>(tvm::RelayExpr, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_0, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_1, void tvm::relay::ExpandDataflow<tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_0, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_1>(tvm::RelayExpr, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_0, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_1)::'lambda'(tvm::RelayExpr const&)) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:468:7
    #80 0x7f3c5188875e in void tvm::relay::ExpandDataflow<tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_0, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_1>(tvm::RelayExpr, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_0, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_1) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:509:3
    #81 0x7f3c5188875e in tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/ir/expr_functor.cc:102:5
    #82 0x7f3c5188b4b6 in tvm::relay::ExprMutator::Mutate(tvm::RelayExpr const&) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:190:48
    #83 0x7f3c5188b4b6 in tvm::relay::ExprMutator::VisitExpr_(tvm::relay::FunctionNode const*) /home/tristan/octoml/tvm/src/relay/ir/expr_functor.cc:204:21
    #84 0x7f3c50fad9c2 in tvm::relay::transform::(anonymous namespace)::ConstantFolder::VisitExpr_(tvm::relay::FunctionNode const*) /home/tristan/octoml/tvm/src/relay/transforms/fold_constant.cc:143:27
    #85 0x7f3c511147c5 in tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>::InitVTable()::'lambda3'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*)::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:127:5
    #86 0x7f3c511147c5 in tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>::InitVTable()::'lambda3'(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*)::__invoke(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:127:5
    #87 0x7f3c5110f2ac in tvm::NodeFunctor<tvm::RelayExpr (tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*)>::operator()(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>*) const /home/tristan/octoml/tvm/include/tvm/node/functor.h:97:12
    #88 0x7f3c5110ec94 in tvm::relay::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr const&)>::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:95:12
    #89 0x7f3c51887bda in tvm::relay::ExprMutator::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/ir/expr_functor.cc:158:34
    #90 0x7f3c518879b8 in tvm::relay::MixedModeMutator::DispatchVisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/ir/expr_functor.cc:94:82
    #91 0x7f3c5188746f in tvm::relay::MixedModeMutator::VisitLeaf(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/ir/expr_functor.cc:81:22
    #92 0x7f3c5188875e in tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_1::operator()(tvm::RelayExpr const&) const /home/tristan/octoml/tvm/src/relay/ir/expr_functor.cc:98:62
    #93 0x7f3c5188875e in void tvm::relay::ExpandDataflow<tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_0, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_1, void tvm::relay::ExpandDataflow<tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_0, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_1>(tvm::RelayExpr, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_0, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_1)::'lambda'(tvm::RelayExpr const&)>(tvm::RelayExpr, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_0, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_1, void tvm::relay::ExpandDataflow<tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_0, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_1>(tvm::RelayExpr, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_0, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_1)::'lambda'(tvm::RelayExpr const&)) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:468:7
    #94 0x7f3c5188875e in void tvm::relay::ExpandDataflow<tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_0, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_1>(tvm::RelayExpr, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_0, tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&)::$_1) /home/tristan/octoml/tvm/include/tvm/relay/expr_functor.h:509:3
    #95 0x7f3c5188875e in tvm::relay::MixedModeMutator::VisitExpr(tvm::RelayExpr const&) /home/tristan/octoml/tvm/src/relay/ir/expr_functor.cc:102:5
    #96 0x7f3c50fac1ba in tvm::relay::transform::FoldConstantExpr(tvm::RelayExpr const&, tvm::IRModule const&, bool) /home/tristan/octoml/tvm/src/relay/transforms/fold_constant.cc:432:47
    #97 0x7f3c50fbee90 in tvm::relay::transform::FoldConstant(bool)::$_0::operator()(tvm::relay::Function, tvm::IRModule, tvm::transform::PassContext) const /home/tristan/octoml/tvm/src/relay/transforms/fold_constant.cc:442:35
    #98 0x7f3c50fbee90 in void tvm::runtime::detail::unpack_call_dispatcher<tvm::relay::Function, 0, 3, tvm::relay::transform::FoldConstant(bool)::$_0>::run<tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (*)(), tvm::relay::transform::FoldConstant(bool)::$_0 const&, tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*, tvm::runtime::TVMMovableArgValueWithContext_&&, tvm::runtime::TVMMovableArgValueWithContext_&&, tvm::runtime::TVMMovableArgValueWithContext_&&) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1646:13
    #99 0x7f3c50fbee90 in void tvm::runtime::detail::unpack_call_dispatcher<tvm::relay::Function, 1, 2, tvm::relay::transform::FoldConstant(bool)::$_0>::run<tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (*)(), tvm::relay::transform::FoldConstant(bool)::$_0 const&, tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*, tvm::runtime::TVMMovableArgValueWithContext_&&, tvm::runtime::TVMMovableArgValueWithContext_&&) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1631:5
    #100 0x7f3c50fbee90 in void tvm::runtime::detail::unpack_call_dispatcher<tvm::relay::Function, 2, 1, tvm::relay::transform::FoldConstant(bool)::$_0>::run<tvm::runtime::TVMMovableArgValueWithContext_>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (*)(), tvm::relay::transform::FoldConstant(bool)::$_0 const&, tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*, tvm::runtime::TVMMovableArgValueWithContext_&&) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1631:5
    #101 0x7f3c50fbee90 in void tvm::runtime::detail::unpack_call_dispatcher<tvm::relay::Function, 3, 0, tvm::relay::transform::FoldConstant(bool)::$_0>::run<>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (*)(), tvm::relay::transform::FoldConstant(bool)::$_0 const&, tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1631:5
    #102 0x7f3c50fbee90 in void tvm::runtime::detail::unpack_call<tvm::relay::Function, 3, tvm::relay::transform::FoldConstant(bool)::$_0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, tvm::relay::transform::FoldConstant(bool)::$_0 const&, tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1671:3
    #103 0x7f3c50fbee90 in void tvm::runtime::TypedPackedFunc<tvm::relay::Function (tvm::relay::Function, tvm::IRModule, tvm::transform::PassContext)>::AssignTypedLambda<tvm::relay::transform::FoldConstant(bool)::$_0>(tvm::relay::transform::FoldConstant(bool)::$_0)::'lambda'(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)::operator()(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*) const /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1744:5
    #104 0x7f3c50fbee90 in tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<void tvm::runtime::TypedPackedFunc<tvm::relay::Function (tvm::relay::Function, tvm::IRModule, tvm::transform::PassContext)>::AssignTypedLambda<tvm::relay::transform::FoldConstant(bool)::$_0>(tvm::relay::transform::FoldConstant(bool)::$_0)::'lambda'(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)> >::Call(tvm::runtime::PackedFuncObj const*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1213:3
    #105 0x7f3c51910088 in tvm::runtime::PackedFuncObj::CallPacked(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1217:3
    #106 0x7f3c51910088 in tvm::runtime::TVMRetValue tvm::runtime::PackedFunc::operator()<tvm::relay::Function, tvm::IRModule, tvm::transform::PassContext>(tvm::relay::Function&&, tvm::IRModule&&, tvm::transform::PassContext&&) const /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1618:9
    #107 0x7f3c51910088 in tvm::relay::Function tvm::runtime::detail::typed_packed_call_dispatcher<tvm::relay::Function>::run<tvm::relay::Function, tvm::IRModule, tvm::transform::PassContext>(tvm::runtime::PackedFunc const&, tvm::relay::Function&&, tvm::IRModule&&, tvm::transform::PassContext&&) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1694:12
    #108 0x7f3c51910088 in tvm::runtime::TypedPackedFunc<tvm::relay::Function (tvm::relay::Function, tvm::IRModule, tvm::transform::PassContext)>::operator()(tvm::relay::Function, tvm::IRModule, tvm::transform::PassContext) const /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1750:10
    #109 0x7f3c51910088 in tvm::relay::transform::FunctionPassNode::operator()(tvm::IRModule, tvm::transform::PassContext const&) const /home/tristan/octoml/tvm/src/relay/ir/transform.cc:133:31
    #110 0x7f3c4d308eb5 in tvm::transform::Pass::operator()(tvm::IRModule, tvm::transform::PassContext const&) const /home/tristan/octoml/tvm/src/ir/transform.cc:274:17
    #111 0x7f3c4d310518 in tvm::transform::SequentialNode::operator()(tvm::IRModule, tvm::transform::PassContext const&) const /home/tristan/octoml/tvm/src/ir/transform.cc:453:11
    #112 0x7f3c4d308eb5 in tvm::transform::Pass::operator()(tvm::IRModule, tvm::transform::PassContext const&) const /home/tristan/octoml/tvm/src/ir/transform.cc:274:17
    #113 0x7f3c4d30821f in tvm::transform::Pass::operator()(tvm::IRModule) const /home/tristan/octoml/tvm/src/ir/transform.cc:258:16
    #114 0x7f3c4d319ce6 in tvm::transform::$_4::operator()(tvm::transform::Pass, tvm::IRModule) const /home/tristan/octoml/tvm/src/ir/transform.cc:501:10
    #115 0x7f3c4d319ce6 in void tvm::runtime::detail::unpack_call_dispatcher<tvm::IRModule, 0, 2, tvm::transform::$_4>::run<tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (*)(), tvm::transform::$_4 const&, tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*, tvm::runtime::TVMMovableArgValueWithContext_&&, tvm::runtime::TVMMovableArgValueWithContext_&&) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1646:13
    #116 0x7f3c4d319ce6 in void tvm::runtime::detail::unpack_call_dispatcher<tvm::IRModule, 1, 1, tvm::transform::$_4>::run<tvm::runtime::TVMMovableArgValueWithContext_>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (*)(), tvm::transform::$_4 const&, tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*, tvm::runtime::TVMMovableArgValueWithContext_&&) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1631:5
    #117 0x7f3c4d319ce6 in void tvm::runtime::detail::unpack_call_dispatcher<tvm::IRModule, 2, 0, tvm::transform::$_4>::run<>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (*)(), tvm::transform::$_4 const&, tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1631:5
    #118 0x7f3c4d319ce6 in void tvm::runtime::detail::unpack_call<tvm::IRModule, 2, tvm::transform::$_4>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, tvm::transform::$_4 const&, tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1671:3
    #119 0x7f3c4d319ce6 in void tvm::runtime::TypedPackedFunc<tvm::IRModule (tvm::transform::Pass, tvm::IRModule)>::AssignTypedLambda<tvm::transform::$_4>(tvm::transform::$_4, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::'lambda'(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)::operator()(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*) const /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1731:5
    #120 0x7f3c4d319ce6 in tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<void tvm::runtime::TypedPackedFunc<tvm::IRModule (tvm::transform::Pass, tvm::IRModule)>::AssignTypedLambda<tvm::transform::$_4>(tvm::transform::$_4, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::'lambda'(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)> >::Call(tvm::runtime::PackedFuncObj const*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1213:3
    #121 0x7f3c51e9a3b2 in tvm::runtime::PackedFuncObj::CallPacked(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const /home/tristan/octoml/tvm/include/tvm/runtime/packed_func.h:1217:3
    #122 0x7f3c51e9a3b2 in TVMFuncCall /home/tristan/octoml/tvm/src/runtime/c_runtime_api.cc:477:9
    #123 0x7f3c68e0571f in __pyx_f_3tvm_4_ffi_4_cy3_4core_FuncCall3 /home/tristan/octoml/tvm/python/tvm/_ffi/_cython/core.cpp:7434:45
    #124 0x7f3c68e0571f in __pyx_f_3tvm_4_ffi_4_cy3_4core_FuncCall(void*, _object*, TVMValue*, int*) /home/tristan/octoml/tvm/python/tvm/_ffi/_cython/core.cpp:7556:57
    #125 0x7f3c68e06029 in __pyx_pf_3tvm_4_ffi_4_cy3_4core_14PackedFuncBase_4__call__ /home/tristan/octoml/tvm/python/tvm/_ffi/_cython/core.cpp:8495:54
    #126 0x7f3c68e06029 in __pyx_pw_3tvm_4_ffi_4_cy3_4core_14PackedFuncBase_5__call__(_object*, _object*, _object*) /home/tristan/octoml/tvm/python/tvm/_ffi/_cython/core.cpp:8459:71
    #127 0x56489c14b64a in _PyObject_MakeTpCall /home/tristan/code/Python-3.8.12/Objects/call.c:159:18
    #128 0x56489c1ab7fa in _PyObject_Vectorcall /home/tristan/code/Python-3.8.12/./Include/cpython/abstract.h:125:16
    #129 0x56489c1ab7fa in _PyObject_Vectorcall /home/tristan/code/Python-3.8.12/./Include/cpython/abstract.h:115:1
    #130 0x56489c1ab7fa in call_function /home/tristan/code/Python-3.8.12/Python/ceval.c:4963:13
    #131 0x56489c1ab7fa in _PyEval_EvalFrameDefault /home/tristan/code/Python-3.8.12/Python/ceval.c:3469:23
    #132 0x56489c14cd29 in function_code_fastcall /home/tristan/code/Python-3.8.12/Objects/call.c:284:14
    #133 0x56489c14cd29 in _PyFunction_Vectorcall /home/tristan/code/Python-3.8.12/Objects/call.c:411:20
    #134 0x56489c14cd29 in _PyObject_FastCallDict /home/tristan/code/Python-3.8.12/Objects/call.c:96:15
    #135 0x56489c14cd29 in _PyObject_Call_Prepend /home/tristan/code/Python-3.8.12/Objects/call.c:888:14
    #136 0x56489c20ec2c in slot_tp_call /home/tristan/code/Python-3.8.12/Objects/typeobject.c:6556:15
    #137 0x56489c14b64a in _PyObject_MakeTpCall /home/tristan/code/Python-3.8.12/Objects/call.c:159:18
    #138 0x56489c1ab37b in _PyObject_Vectorcall /home/tristan/code/Python-3.8.12/./Include/cpython/abstract.h:125:16
    #139 0x56489c1ab37b in _PyObject_Vectorcall /home/tristan/code/Python-3.8.12/./Include/cpython/abstract.h:115:1
    #140 0x56489c1ab37b in call_function /home/tristan/code/Python-3.8.12/Python/ceval.c:4963:13
    #141 0x56489c1ab37b in _PyEval_EvalFrameDefault /home/tristan/code/Python-3.8.12/Python/ceval.c:3500:19
    #142 0x56489c1a5d9c in PyEval_EvalFrameEx /home/tristan/code/Python-3.8.12/Python/ceval.c:741:12
    #143 0x56489c1a5d9c in _PyEval_EvalCodeWithName /home/tristan/code/Python-3.8.12/Python/ceval.c:4298:14
    #144 0x56489c21d5a6 in PyEval_EvalCodeEx /home/tristan/code/Python-3.8.12/Python/ceval.c:4327:12
    #145 0x56489c21d5a6 in PyEval_EvalCode /home/tristan/code/Python-3.8.12/Python/ceval.c:718:12
    #146 0x56489c22d442 in run_eval_code_obj /home/tristan/code/Python-3.8.12/Python/pythonrun.c:1166:9
    #147 0x56489c22d3e2 in run_mod /home/tristan/code/Python-3.8.12/Python/pythonrun.c:1188:9
    #148 0x56489c0ef5e3 in pyrun_file /home/tristan/code/Python-3.8.12/Python/pythonrun.c:1085:15
    #149 0x56489c0eea80 in pyrun_simple_file /home/tristan/code/Python-3.8.12/Python/pythonrun.c:439:13
    #150 0x56489c0eea80 in PyRun_SimpleFileExFlags /home/tristan/code/Python-3.8.12/Python/pythonrun.c:472:15
    #151 0x56489c1f9847 in pymain_run_file /home/tristan/code/Python-3.8.12/Modules/main.c:385:15
    #152 0x56489c1f9847 in pymain_run_python /home/tristan/code/Python-3.8.12/Modules/main.c:610:21
    #153 0x56489c1f9847 in Py_RunMain /home/tristan/code/Python-3.8.12/Modules/main.c:689:5
    #154 0x56489c1f91cc in Py_BytesMain /home/tristan/code/Python-3.8.12/Modules/main.c:743:12
    #155 0x7f3c95504564 in __libc_start_main csu/../csu/libc-start.c:332:16
    #156 0x56489c1f90cd in _start (/usr/local/bin/python3.8+0x1b50cd)

SUMMARY: AddressSanitizer: stack-overflow (/lib64/ld-linux-x86-64.so.2+0x14bb5)
==3061121==ABORTING

@tqchen
Copy link
Member

tqchen commented Jul 28, 2022

That might hint something is wrong higher up?

@wrongtest-intellif
Copy link
Contributor

Following the hint of sanitizer that something related to stack overflow happens, there is a possible llvm issue found.

The full dumped ll: scatter_nd_stackoverflow.ll.txt

; Function Attrs: noinline
define internal fastcc i32 @tvmgen_default_fused_scatter_nd_compute_(i8* noalias align 128 %0, i8* noalias nocapture readonly align 128 %1, i8* noalias align 128 %2, i8* noalias align 128 %3) unnamed_addr #2 {
entry:
  call void @llvm.memcpy.p0i8.p0i8.i64(i8* noundef nonnull align 128 dereferenceable(1080000) %0, i8* noundef nonnull align 128 dereferenceable(1080000) %1, i64 1080000, i1 false)
  br label %for_body_j

for_body_j:                                       ; preds = %for_body_j, %entry
  %j1 = phi i32 [ 0, %entry ], [ %13, %for_body_j ]
  %4 = alloca %closure_loop_parallel_k, align 8
  %5 = getelementptr inbounds %closure_loop_parallel_k, %closure_loop_parallel_k* %4, i64 0, i32 0
  store i8* %0, i8** %5, align 8
  %6 = getelementptr inbounds %closure_loop_parallel_k, %closure_loop_parallel_k* %4, i64 0, i32 1
  store i8* %2, i8** %6, align 8
  %7 = getelementptr inbounds %closure_loop_parallel_k, %closure_loop_parallel_k* %4, i64 0, i32 2
  store i32 %j1, i32* %7, align 8
  %8 = getelementptr inbounds %closure_loop_parallel_k, %closure_loop_parallel_k* %4, i64 0, i32 3
  store i8* %3, i8** %8, align 8
  %9 = load i32 (i32 (i32, %0*, i8*)*, i8*, i32)*, i32 (i32 (i32, %0*, i8*)*, i8*, i32)** @__TVMBackendParallelLaunch, align 8, !tbaa !5
  %10 = bitcast %closure_loop_parallel_k* %4 to i8*
  %11 = call i32 %9(i32 (i32, %0*, i8*)* nonnull @__tvm_parallel_lambda, i8* nonnull %10, i32 0)
  %12 = icmp ne i32 %11, 0
  %13 = add nuw nsw i32 %j1, 1
  %exitcond.not = icmp eq i32 %13, 270000
  %or.cond = select i1 %12, i1 true, i1 %exitcond.not
  br i1 %or.cond, label %common.ret, label %for_body_j, !prof !142

common.ret:                                       ; preds = %for_body_j
  ret i32 %11
}

The alloca %4 = alloca %closure_loop_parallel_k, align 8 is generated within the loop, but the alloca's lifetime is to the end of the function, we may not expect the stack automatically shrink per iter. Thus it is not a good idea to use alloca under large loops, especially when in the case it is not promote-able to SSA-value.

A quick experimental modification to https://github.com/apache/tvm/blob/main/src/target/llvm/codegen_cpu.cc#L645 make segfault disappear in my environment.

auto cur_pt = builder_->GetInsertBlock();
builder_->SetInsertPoint(&(*(function_->getEntryBlock().getFirstInsertionPt())));
llvm::Value* cvalue = builder_->CreateAlloca(ctype, ConstInt32(1));  // alloca at function begin
builder_->SetInsertPoint(cur_pt );

So I think we could either

  1. Avoid parallelize inner loop if the outer is too large.
  2. Keep a code segment (perhaps at the function entry) for specially usages of alloca.

@tkonolige
Copy link
Contributor

@wrongtest-intellif This sounds like a bug in StorageRewrite and/or PlanAndUpdateBufferAllocationLocation where the allocation should be lifted outside the loop but isn't.

@wrongtest-intellif
Copy link
Contributor

@wrongtest-intellif This sounds like a bug in StorageRewrite and/or PlanAndUpdateBufferAllocationLocation where the allocation should be lifted outside the loop but isn't.

Emmmm I think it is not. https://github.com/apache/tvm/blob/main/src/target/llvm/codegen_cpu.cc#L645 is an dedicated usage of llvm alloca for thread pool, not from tvm level allocation.

@wrongtest-intellif
Copy link
Contributor

cc @tkonolige @kparzysz-quic Hi~ could you kindly review the fix again?

@@ -642,7 +642,16 @@ CodeGenLLVM::TypedPointer CodeGenCPU::PackClosureData(const Array<Var>& vfields,
}
llvm::StructType* ctype = struct_name.size() ? llvm::StructType::create(fields, struct_name)
: llvm::StructType::create(fields);
llvm::Value* cvalue = builder_->CreateAlloca(ctype, ConstInt32(1));
// create ctype alloca at function entry
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add an explanation of why we allocate at the function entry.

@chengven027
Copy link
Contributor Author

@kparzysz-quic Looks like CI has a error. Can you help check it ? thanks.

@masahi
Copy link
Member

masahi commented Aug 18, 2022

@tvm-bot rerun

1 similar comment
@masahi
Copy link
Member

masahi commented Aug 18, 2022

@tvm-bot rerun

@kparzysz-quic
Copy link
Contributor

@driazati Could you take a look at what happened here with the bot? We couldn't get it to rerun the CI.

@driazati
Copy link
Member

@driazati Could you take a look at what happened here with the bot? We couldn't get it to rerun the CI.

#12491 should fix it

@chengven027
Copy link
Contributor Author

@masahi Could you review the fix again? thanks.

@masahi masahi merged commit 41be1b4 into apache:main Aug 19, 2022
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
* fix scatterND large shape problem

* fix thread pool alloca

* add scatternd unit test

* update with comment

* Empty

Co-authored-by: wrongtest <wrongtest0@gmail.com>
@chengven027 chengven027 deleted the fix_scatternd.bug branch January 12, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants