Civitasv opened a new issue, #15306:
URL: https://github.com/apache/tvm/issues/15306
I'm using the `relax.build` function to build my IR module.
The IR module contains a line:
```txt
lv254 = R.call_tir(resize2d, (lv253,), out_sinfo=R.Tensor((1, 512, 128,
128), dtype="float32"))
```
### Expected behavior
It should build successfully.
### Actual behavior
Errors as follow:
```txt
File "/home/xxx/xxx/tvm/python/tvm/relax/vm_build.py", line 321, in build
new_mod = seq(mod)
File "/home/xxx/xxx/tvm/python/tvm/ir/transform.py", line 238, in __call__
return _ffi_transform_api.RunPass(self, mod)
File "/home/xxx/xxx/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 238,
in __call__
raise get_last_ffi_error()
tvm.error.InternalError: Traceback (most recent call last):
26: TVMFuncCall
25:
tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<tvm::runtime::TypedPackedFunc<tvm::IRModule
(tvm::transform::Pass,
tvm::IRModule)>::AssignTypedLambda<tvm::transform::__mk_TVM9::{lambda(tvm::transform::Pass,
tvm::IRModule)#1}>(tvm::transform::__mk_TVM9::{lambda(tvm::transform::Pass,
tvm::IRModule)#1}, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >)::{lambda(tvm::runtime::TVMArgs const&,
tvm::runtime::TVMRetValue*)#1}> >::Call(tvm::runtime::PackedFuncObj const*,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>
>, tvm::runtime::TVMRetValue)
24: tvm::transform::Pass::operator()(tvm::IRModule) const
23: tvm::transform::Pass::operator()(tvm::IRModule,
tvm::transform::PassContext const&) const
22: tvm::transform::SequentialNode::operator()(tvm::IRModule,
tvm::transform::PassContext const&) const
21: tvm::transform::Pass::operator()(tvm::IRModule,
tvm::transform::PassContext const&) const
20: tvm::relax::transform::FunctionPassNode::operator()(tvm::IRModule,
tvm::transform::PassContext const&) const
19: _ZN3tvm7runtime13PackedFuncObj
18: tvm::runtime::TypedPackedFunc<tvm::relax::Function
(tvm::relax::Function, tvm::IRModule,
tvm::transform::PassContext)>::AssignTypedLambda<tvm::relax::transform::RewriteDataflowReshape()::{lambda(tvm::relax::Function,
tvm::IRModule,
tvm::transform::PassContext)#1}>(tvm::relax::transform::RewriteDataflowReshape()::{lambda(tvm::relax::Function,
tvm::IRModule, tvm::transform::PassContext)#1})::{lambda(tvm::runtime::TVMArgs
const&, tvm::runtime::TVMRetValue*)#1}::operator()(tvm::runtime::TVMArgs
const&, tvm::runtime::TVMRetValue*) const
17: tvm::relax::RewriteDataflowReshape(tvm::relax::Function const&,
tvm::IRModule const&)
16: tvm::relax::ExprMutator::VisitExpr(tvm::RelayExpr const&)
15: tvm::relax::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr
const&)>::VisitExpr(tvm::RelayExpr const&)
14:
_ZZN3tvm5relax11ExprFunctorIFNS_9RelayExprERKS2_EE10InitVTableEvENUlRKNS_
13: tvm::relax::ExprMutator::VisitExpr_(tvm::relax::FunctionNode const*)
12: tvm::relax::ExprMutator::VisitWithNewScope(tvm::RelayExpr const&,
tvm::runtime::Optional<tvm::runtime::Array<tvm::relax::Var, void> >)
11: tvm::relax::ExprMutator::VisitExpr(tvm::RelayExpr const&)
10: tvm::relax::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr
const&)>::VisitExpr(tvm::RelayExpr const&)
9:
_ZZN3tvm5relax11ExprFunctorIFNS_9RelayExprERKS2_EE10InitVTableEvENUlRKNS_
8: tvm::relax::ExprMutator::VisitExpr_(tvm::relax::SeqExprNode const*)
7:
tvm::relax::DataflowReshapeRewriter::VisitBindingBlock(tvm::relax::BindingBlock
const&)
6:
tvm::relax::ExprMutator::VisitBindingBlock_(tvm::relax::DataflowBlockNode
const*)
5: tvm::relax::ExprMutator::VisitBinding_(tvm::relax::VarBindingNode
const*, tvm::relax::PrimValueNode const*)
4: tvm::relax::ExprMutator::VisitExpr(tvm::RelayExpr const&)
3: tvm::relax::ExprFunctor<tvm::RelayExpr (tvm::RelayExpr
const&)>::VisitExpr(tvm::RelayExpr const&)
2:
_ZZN3tvm5relax11ExprFunctorIFNS_9RelayExprERKS2_EE10InitVTableEvENUlRKNS_
1: tvm::relax::DataflowReshapeRewriter::VisitExpr_(tvm::relax::CallNode
const*)
0: tvm::IRModuleNode::Lookup(tvm::GlobalVar const&) const
File "/home/xxx/xxx/tvm/src/ir/module.cc", line 288
InternalError: Check failed: (it != functions.end()) is false: There is no
definition of I.GlobalVar("resize2d")
```
### Environment
OS: Ubuntu 20.04
TVM: almost latest version of unity branch
### Triage
Please refer to the list of label tags
[here](https://github.com/apache/tvm/wiki/Issue-Triage-Labels) to find the
relevant tags and add them below in a bullet format (example below).
* needs-triage
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]