[Mlir-commits] [mlir] 43dfde4 - [MLIR][NVVM] Enable result type inference (#181781)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Feb 24 20:57:29 PST 2026


Author: Srinivasa Ravi
Date: 2026-02-25T10:27:25+05:30
New Revision: 43dfde4a07b37e8a8b470f38ef881052cac9336d

URL: https://github.com/llvm/llvm-project/commit/43dfde4a07b37e8a8b470f38ef881052cac9336d
DIFF: https://github.com/llvm/llvm-project/commit/43dfde4a07b37e8a8b470f38ef881052cac9336d.diff

LOG: [MLIR][NVVM] Enable result type inference (#181781)

Includes `InferOpTypeInterface.td` in `NVVMOps.td` enabling result type
inference for NVVM operations.

Fixes a test for `nvvm.redux.sync` in `nvvm.py` due to a resulting
change in the python binding for the operation.

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
    mlir/test/python/dialects/nvvm.py

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td b/mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
index 308b002e4ded3..40f631fa0bb2c 100644
--- a/mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
+++ b/mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
@@ -21,6 +21,7 @@ include "mlir/Dialect/Ptr/IR/MemorySpaceInterfaces.td"
 include "mlir/Interfaces/SideEffectInterfaces.td"
 include "mlir/Dialect/LLVMIR/BasicPtxBuilderInterface.td"
 include "mlir/Interfaces/InferIntRangeInterface.td"
+include "mlir/Interfaces/InferTypeOpInterface.td"
 include "mlir/Dialect/LLVMIR/LLVMTypes.td"
 include "mlir/IR/CommonAttrConstraints.td"
 

diff  --git a/mlir/test/python/dialects/nvvm.py b/mlir/test/python/dialects/nvvm.py
index 62236c31e5fdc..f3af2007ac9c1 100644
--- a/mlir/test/python/dialects/nvvm.py
+++ b/mlir/test/python/dialects/nvvm.py
@@ -172,13 +172,13 @@ def reductions(mask, vi32, vf32):
                     nvvm.ReductionKind.UMIN,
                     nvvm.ReductionKind.XOR,
                 ):
-                    nvvm.redux_sync(i32, vi32, kind, vi32)
+                    nvvm.redux_sync(vi32, kind, vi32)
 
                 for kind in (
                     nvvm.ReductionKind.FMIN,
                     nvvm.ReductionKind.FMAX,
                 ):
-                    nvvm.redux_sync(f32, vf32, kind, vi32, abs=abs, nan=nan)
+                    nvvm.redux_sync(vf32, kind, vi32, abs=abs, nan=nan)
 
 
 # CHECK-LABEL:   func.func @reductions(


        


More information about the Mlir-commits mailing list