zhuwenxi commented on issue #7246:
URL: https://github.com/apache/tvm/issues/7246#issuecomment-787769062


   @tqchen Do you know the specific LLVM API to create a variable-length array 
with thread-local storage?
   
   I'm starting from the LLVM backend, and I found existing code uses 
`builder_->CreateAlloca()` to do codegen for the `tvm_stack_alloc`instrinsic: 
https://github.com/apache/tvm/blob/main/src/target/llvm/codegen_cpu.cc#L892
   
   To make the allocation thread-local, I searched over all the llvm document 
but have no luck. The only TLS related thread I get from llvm form is this: 
https://llvm.discourse.group/t/jit-execution-with-thread-local-global-variable/1081,
 which demos how to create a thread-local llvm::GlobalVariable.
   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to