Skip to content

Conversation

@spectrometerHBH
Copy link
Contributor

Originally, it is not allowed to sync threads inside a condition while, if.

This PR introduces tvm_thread_invariant op to annotate the condition to be thread id invariant and get around the check.

@junrushao junrushao merged commit 5308739 into apache:main Jan 4, 2024
junrushao pushed a commit to junrushao/tvm that referenced this pull request Jan 7, 2024
Originally, it is not allowed to sync threads inside a condition `while, if`.

This PR introduces `tvm_thread_invariant` op to annotate the condition to be thread id invariant and get around the check.
junrushao added a commit to junrushao/tvm that referenced this pull request Jan 15, 2024
PR apache#16345 introduced a TIR intrinsic `tvm_thread_invariant` as a no-op
intrinsic that indicates that a condition is an invariant across
threads. It is a necessary change to support MoE group GEMM operations.

However, we noticed that the LLVM-ROCm backend has been broken since
then because this no-op intrinsic hasn't been properly handled in this
particular backend. This PR fixes this behavior by checking this no-op
in the LLVM backend.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants