Skip to content

[Bug] StringImm Object Can't Be Pass to C++ Side from Python Side #15716

@Johnson9009

Description

@Johnson9009

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")

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