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/06/21 04:34:27 UTC
[GitHub] [tvm] wrongtest opened a new pull request, #11795: [CodeGen][LLVM] Lower if_then_else() with select
wrongtest opened a new pull request, #11795:
URL: https://github.com/apache/tvm/pull/11795
Hi, there. It seems better to use select directly for `if_then_else()` expr. Since `if_then_else()` is common in padding representation, it could hopefully save lots of cross-bb overheads.
My two remaining questions:
--
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 #11795: [CodeGen][LLVM] Lower if_then_else() with select
Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on PR #11795:
URL: https://github.com/apache/tvm/pull/11795#issuecomment-1161275250
@wrongtest Thank you so much for the discussion!
--
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 #11795: [CodeGen][LLVM] Lower if_then_else() with select
Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on PR #11795:
URL: https://github.com/apache/tvm/pull/11795#issuecomment-1161258565
Quick question: in TIR, `T.Select` means both branches are executed no matter which value the conditional is evaluated to - which brings benefits that make it vectorizable in certain cases. However, if the conditional is a safeguard to avoid access out of buffer boundary, replacing it with `T.Select` will lead the program to crash. Therefore, I would love to learn if our implementation here in LLVM codegen will lead to the same effect? Thanks a lot!
--
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] wrongtest commented on pull request #11795: [CodeGen][LLVM] Lower if_then_else() with select
Posted by GitBox <gi...@apache.org>.
wrongtest commented on PR #11795:
URL: https://github.com/apache/tvm/pull/11795#issuecomment-1161261592
> the conditional is a safeguard
Thanks for the reply! So is the `if_then_else` also take short-circuit evaluation semantic like if stmt? If so I think my replacement is unsafe. What about add a check like `SideEffect(e) <= kReadState`?
--
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] wrongtest closed pull request #11795: [CodeGen][LLVM] Lower if_then_else() with select
Posted by GitBox <gi...@apache.org>.
wrongtest closed pull request #11795: [CodeGen][LLVM] Lower if_then_else() with select
URL: https://github.com/apache/tvm/pull/11795
--
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] wrongtest commented on pull request #11795: [CodeGen][LLVM] Lower if_then_else() with select
Posted by GitBox <gi...@apache.org>.
wrongtest commented on PR #11795:
URL: https://github.com/apache/tvm/pull/11795#issuecomment-1161267410
After some thinking, it seems to be better to make TIR transformation if_then_else() -> T.select if neccesary, thus do not complex the llvm codegen.
Thank you all the same! @junrushao1994
--
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