You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/09/10 05:32:01 UTC

[GitHub] [tvm] zhanghaohit opened a new issue #8977: [Bug][VM] If not allocate on stack, VM runtime cannot work?

zhanghaohit opened a new issue #8977:
URL: https://github.com/apache/tvm/issues/8977


   In [`src/tir/transforms/lower_tvm_builtin.cc`](https://github.com/apache/tvm/blob/f6a404447406f91ddf6195ac044dc1f0b0e867e7/src/tir/transforms/lower_tvm_builtin.cc#L116)
   
   ```c++
       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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] masahi edited a comment on issue #8977: [Bug][VM] If not allocate on stack, VM runtime cannot work?

Posted by GitBox <gi...@apache.org>.
masahi edited a comment on issue #8977:
URL: https://github.com/apache/tvm/issues/8977#issuecomment-1008440272


   What is the status of this issue and how it relates to https://github.com/apache/tvm/issues/8978?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] mbrookhart commented on issue #8977: [Bug][VM] If not allocate on stack, VM runtime cannot work?

Posted by GitBox <gi...@apache.org>.
mbrookhart commented on issue #8977:
URL: https://github.com/apache/tvm/issues/8977#issuecomment-920444851


   This is the test that fails in the VM without this code: https://github.com/apache/tvm/pull/9019


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] masahi commented on issue #8977: [Bug][VM] If not allocate on stack, VM runtime cannot work?

Posted by GitBox <gi...@apache.org>.
masahi commented on issue #8977:
URL: https://github.com/apache/tvm/issues/8977#issuecomment-1008440272


   What is the status of this issue?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org