-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
executor:vmruntime components of VM flow. src/runtime/vm, python/tvm/runtime/vm.pyruntime components of VM flow. src/runtime/vm, python/tvm/runtime/vm.pyflow:vmtype: bug
Description
In src/tir/transforms/lower_tvm_builtin.cc
if (device_type_.defined()) {
if (const auto* dev_type = device_type_.as<IntImmNode>()) {
if (dev_type->value == kDLCPU) {
int32_t constant_size = op->constant_allocation_size();
if (constant_size > 0 && constant_size * nbytes < runtime::kMaxStackAlloca) {
return stmt;
}
}
}
}If the condition if (constant_size > 0 && constant_size * nbytes < runtime::kMaxStackAlloca) is not true, the generated IR cannot work in VM runtime. Please see the detailed explanation here #8274.
The bug is not triggering any problem for now, since this condition may be always true in our test. I'm not very sure this is a bug, but we need deeper investigation on this.
Metadata
Metadata
Assignees
Labels
executor:vmruntime components of VM flow. src/runtime/vm, python/tvm/runtime/vm.pyruntime components of VM flow. src/runtime/vm, python/tvm/runtime/vm.pyflow:vmtype: bug