I found a very strange bug about StringImm, like the simple code below can reproduce the error.
terminate called after throwing an instance of 'tvm::runtime::InternalError'
what(): [11:30:45] xxx/src/runtime/object.cc:150: InternalError: Check failed: (tindex < type_table_.size() && type_table_[tindex].allocated_slots != 0) is false: Unknown type index 8
Stack trace:
0: ffi_call
Steps to reproduce
from tvm import ir, tir
a = tir.StringImm("global")
b = tir.Var(a, "int32")