Skip to content

Conversation

@DharuniRAcharya
Copy link
Contributor

This patch replaces generic LLVM_Type with specific I32 type in NVVM operations.

NVVM_SyncWarpOp: Change mask parameter from LLVM_Type to I32.
NVVM_CpAsyncOp: Change cpSize parameter from Optional<LLVM_Type> to Optional<I32>.

This patch replaces generic LLVM_Type with specific I32 type in NVVM operations.

NVVM_SyncWarpOp: Change mask parameter from LLVM_Type to I32
NVVM_CpAsyncOp: Change cpSize parameter from Optional<LLVM_Type> to Optional<I32>

Signed-off-by: Dharuni R Acharya <[email protected]>
@llvmbot
Copy link
Member

llvmbot commented Nov 13, 2025

@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-mlir-llvm

Author: Dharuni R Acharya (DharuniRAcharya)

Changes

This patch replaces generic LLVM_Type with specific I32 type in NVVM operations.

NVVM_SyncWarpOp: Change mask parameter from LLVM_Type to I32.
NVVM_CpAsyncOp: Change cpSize parameter from Optional&lt;LLVM_Type&gt; to Optional&lt;I32&gt;.


Full diff: https://github.com/llvm/llvm-project/pull/167826.diff

1 Files Affected:

  • (modified) mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td (+2-2)
diff --git a/mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td b/mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
index 4c13c5ddb2886..1c30d754a1792 100644
--- a/mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
+++ b/mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
@@ -1387,7 +1387,7 @@ def NVVM_VoteSyncOp
 
 def NVVM_SyncWarpOp :
   NVVM_Op<"bar.warp.sync">,
-  Arguments<(ins LLVM_Type:$mask)> {
+  Arguments<(ins I32:$mask)> {
   let summary = "Warp Barrier Synchronization Op";
   let description = [{
     The `nvvm.bar.warp.sync` operation performs barrier synchronization for threads 
@@ -1473,7 +1473,7 @@ def NVVM_CpAsyncOp : NVVM_Op<"cp.async.shared.global">,
                  LLVM_PointerGlobal:$src,
                  I32Attr:$size,
                  LoadCacheModifierAttr:$modifier,
-                 Optional<LLVM_Type>:$cpSize)> {
+                 Optional<I32>:$cpSize)> {
   let assemblyFormat = "$dst `,` $src `,` $size `,` `cache` `=` $modifier (`,` $cpSize^)? attr-dict `:` type(operands)";
   let hasVerifier = 1;
   let extraClassDeclaration = [{

Copy link
Contributor

@durga4github durga4github left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the fix!

Copy link
Member

@grypp grypp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks

@durga4github durga4github merged commit 1a8e6f7 into llvm:main Nov 13, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants