Skip to content

[Bug] Check failed: type_code_ == kTVMObjectHandle (0 vs. 8) : expected Object but got int #14717

@hcms1994

Description

@hcms1994

I encountered this error when:
mod, config = partition_for_tensorrt(mod, params)

error message:
Traceback (most recent call last):
File "autoTVM_tune_relay_tensorrt.py", line 105, in
tune_and_evaluate()
File "autoTVM_tune_relay_tensorrt.py", line 67, in tune_and_evaluate
mod, config = partition_for_tensorrt(mod, params)
File "/home/jiyingyu/TVM_work/code/tvm-0.11.0-release/python/tvm/ir/module.py", line 110, in getitem
return _ffi_api.Module_LookupDef(self, var)
File "/home/jiyingyu/TVM_work/code/tvm-0.11.0-release/python/tvm/_ffi/_ctypes/packed_func.py", line 237, in call
raise get_last_ffi_error()
tvm._ffi.base.TVMError: Traceback (most recent call last):
2: TVMFuncCall
1: tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<tvm::runtime::TypedPackedFunc<tvm::TypeData (tvm::IRModule, tvm::GlobalTypeVar)>::AssignTypedLambda<tvm::{lambda(tvm::IRModule, tvm::GlobalTypeVar)#6}>(tvm::{lambda(tvm::IRModule, tvm::GlobalTypeVar)#6}, std::__cxx11::basic_string<char, std::char_traits, std::allocator >)::{lambda(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)#1}> >::Call(tvm::runtime::PackedFuncObj const*, std::_cxx11::basic_string<char, std::char_traits, std::allocator >, tvm::runtime::TVMRetValue)
0: tvm::runtime::TVMMovableArgValueWithContext
::operator tvm::GlobalTypeVartvm::GlobalTypeVar() const
3: TVMFuncCall
2: tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<tvm::runtime::TypedPackedFunc<tvm::TypeData (tvm::IRModule, tvm::GlobalTypeVar)>::AssignTypedLambda<tvm::{lambda(tvm::IRModule, tvm::GlobalTypeVar)#6}>(tvm::{lambda(tvm::IRModule, tvm::GlobalTypeVar)#6}, std::__cxx11::basic_string<char, std::char_traits, std::allocator >)::{lambda(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)#1}> >::Call(tvm::runtime::PackedFuncObj const*, std::cxx11::basic_string<char, std::char_traits, std::allocator >, tvm::runtime::TVMRetValue)
1: tvm::runtime::TVMMovableArgValueWithContext
::operator tvm::GlobalTypeVartvm::GlobalTypeVar() const
0: tvm::GlobalTypeVar tvm::runtime::TVMPODValue
::AsObjectReftvm::GlobalTypeVar() const
File "/home/jiyingyu/TVM_work/code/tvm-0.11.0-release/include/tvm/runtime/packed_func.h", line 777
TVMError: In function ir.Module_LookupDef(0: IRModule, 1: GlobalTypeVar) -> relay.TypeData: error while converting argument 1: [10:47:20] /home/jiyingyu/TVM_work/code/tvm-0.11.0-release/include/tvm/runtime/packed_func.h:1886:

An error occurred during the execution of TVM.
For more information, please see: https://tvm.apache.org/docs/errors.html

Check failed: type_code_ == kTVMObjectHandle (0 vs. 8) : expected Object but got int

Have you got any idea why this error happen?

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triagePRs or issues that need to be investigated by maintainers to find the right assignees to address ittype: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions