We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85e3689 commit cbba0e3Copy full SHA for cbba0e3
include/tvm/runtime/object.h
@@ -889,8 +889,8 @@ inline bool Object::IsInstance() const {
889
uint32_t begin = TargetType::RuntimeTypeIndex();
890
// The condition will be optimized by constant-folding.
891
if (TargetType::_type_child_slots != 0) {
892
- uint32_t end = begin + TargetType::_type_child_slots;
893
- if (self->type_index_ >= begin && self->type_index_ <= end) return true;
+ uint32_t end = begin + TargetType::_type_child_slots + 1;
+ if (self->type_index_ >= begin && self->type_index_ < end) return true;
894
} else {
895
if (self->type_index_ == begin) return true;
896
}
0 commit comments