tqchen commented on issue #9022:
URL: https://github.com/apache/tvm/issues/9022#issuecomment-920463412


   @mbs-octoml I believe the current behavior is intended. 
   
   In the context of CPU, we want to preserve small alloca until the code 
generation point. And then the code will generate the stack alloca in an 
explicit way. Only when memory is big enough(bigger than a constant), we will 
use an opaque allocation instead.
   
   
   Stack allocation is important for the prformance of the CPU code, because we 
need to rely on LLVM's mem2reg pass to transform a set of constant indexing 
into stack allocation and turn them into registers, so the code can run 
effectively. Of course this can be a target specific thing. LowerTVMBuiltin 
right now has the assumption to only run on host(CPU) code.
   


-- 
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-unsubscr...@tvm.apache.org

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


Reply via email to