Skip to content

Conversation

@durga4github
Copy link
Contributor

This patch adds an Op for mbarrier.try_wait operation which lowers
to the corresponding intrinsics. This Op has support for an optional
time-limit, state-or-phase as well as relaxed memory semantics,
completing the features on this Op up to Blackwell.

Unlike the existing nvvm.mbarrier.try_wait.parity Op, this Op
does not provide a blocking implementation. We intend to
add looping around this at NVGPU in a subsequent PR
(and deprecate the inline-asm based Op here).

lit tests are added to verify the lowering to the intrinsics.

This patch adds an Op for mbarrier.try_wait operation
which lowers to the corresponding intrinsics. This Op
has support for optional time-limit, state-or-phase
as well as relaxed memory semantics, completing the
features on this Op up to Blackwell.

Unlike the existing `nvvm.mbarrier.try_wait.parity` Op,
this Op does not provide a _blocking_ implementation.
We intend to add a looping around this at NVGPU in a
subsequent PR(and deprecate the inline-asm based Op here).

lit tests are added to verify the lowering to the intrinsics.

Signed-off-by: Durgadoss R <durgadossr@nvidia.com>
@durga4github durga4github requested a review from grypp as a code owner December 2, 2025 12:24
@durga4github durga4github merged commit 46ef57a into llvm:main Dec 4, 2025
11 checks passed
@durga4github durga4github deleted the durgadossr/mlir_blk_mbar_4 branch December 4, 2025 05:05
kcloudy0717 pushed a commit to kcloudy0717/llvm-project that referenced this pull request Dec 4, 2025
This patch adds an Op for mbarrier.try_wait operation which lowers
to the corresponding intrinsics. This Op has support for an optional
time-limit, state-or-phase as well as relaxed memory semantics,
completing the features on this Op up to Blackwell.

Unlike the existing `nvvm.mbarrier.try_wait.parity` Op, this Op
does not provide a _blocking_ implementation. We intend to
add looping around this at NVGPU in a subsequent PR
(and deprecate the inline-asm based Op here).

lit tests are added to verify the lowering to the intrinsics.

Signed-off-by: Durgadoss R <durgadossr@nvidia.com>
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.

2 participants