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 2022/05/14 01:10:07 UTC

[GitHub] [tvm] tqchen opened a new pull request, #11320: [LLVM] Introduce RAII config option to config LLVM global config

tqchen opened a new pull request, #11320:
URL: https://github.com/apache/tvm/pull/11320

   LLVM comes with global cli configurations which can persist through
   out the process. Direct setting these parameters can affect future LLVM passes.
   
   While an ideal approach is to config compilation pipeline in a way that is
   independent of such global configs, it is hard to do so given the current
   way that LLVM passes are being configed.
   
   To work around this problem. This PR introduced a helper scope
   to set these configurations in RAII style and recover the settings
   after the scope ends.


-- 
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] tqchen commented on pull request #11320: [LLVM] Introduce RAII config option to config LLVM global config

Posted by GitBox <gi...@apache.org>.
tqchen commented on PR #11320:
URL: https://github.com/apache/tvm/pull/11320#issuecomment-1126615705

   it is not. LLVM itself is not thread safe in this case 


-- 
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] tqchen commented on pull request #11320: [LLVM] Introduce RAII config option to config LLVM global config

Posted by GitBox <gi...@apache.org>.
tqchen commented on PR #11320:
URL: https://github.com/apache/tvm/pull/11320#issuecomment-1126600875

   cc @junrushao1994 @kparzysz-quic @areusch 


-- 
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] areusch commented on pull request #11320: [DRAFT][LLVM] Introduce RAII config option to config LLVM global config

Posted by GitBox <gi...@apache.org>.
areusch commented on PR #11320:
URL: https://github.com/apache/tvm/pull/11320#issuecomment-1130411274

   I added my 2c on the discuss post. I'm not in favor of this if we aren't clear that we can reset global state or if we can't find an example of LLVM being used like this in their CI.


-- 
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] tqchen closed pull request #11320: [DRAFT][LLVM] Introduce RAII config option to config LLVM global config

Posted by GitBox <gi...@apache.org>.
tqchen closed pull request #11320: [DRAFT][LLVM] Introduce RAII config option to config LLVM global config
URL: https://github.com/apache/tvm/pull/11320


-- 
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] junrushao1994 commented on pull request #11320: [LLVM] Introduce RAII config option to config LLVM global config

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on PR #11320:
URL: https://github.com/apache/tvm/pull/11320#issuecomment-1126610279

   This seems to be sufficient for our cases to avoid the global state. Quick question: is this approach thread-safe? 


-- 
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] tqchen commented on pull request #11320: [LLVM] Introduce RAII config option to config LLVM global config

Posted by GitBox <gi...@apache.org>.
tqchen commented on PR #11320:
URL: https://github.com/apache/tvm/pull/11320#issuecomment-1126601954

   Code example:
   
   ```c++
    void MyCodegen() {
       {
           With<LLVMCLIOption<int>> scope("unroll-max-count", 2);
           // max-unroll-count set to 2 here
        }
        // global option reset to default.
   }
   ```
   Background: https://discuss.tvm.apache.org/t/modularizing-llvm-codegen-jit/12764/20
   


-- 
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] tqchen commented on pull request #11320: [DRAFT][LLVM] Introduce RAII config option to config LLVM global config

Posted by GitBox <gi...@apache.org>.
tqchen commented on PR #11320:
URL: https://github.com/apache/tvm/pull/11320#issuecomment-1126734471

   Mark as draft and do not merge for now, until we get confirmation from @kparzysz-quic that this is what we need


-- 
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] tqchen commented on pull request #11320: [DRAFT][LLVM] Introduce RAII config option to config LLVM global config

Posted by GitBox <gi...@apache.org>.
tqchen commented on PR #11320:
URL: https://github.com/apache/tvm/pull/11320#issuecomment-1131730856

   This particular PR is not about resetting global state in general, but resetting the global configuration passes that affects compilation and was the motivation of the original discussion, will follow up more on the post as well


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