[Mlir-commits] [mlir] [MLIR][NVVM] Enable result type inference (PR #181781)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Feb 16 23:11:56 PST 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Srinivasa Ravi (Wolfram70)
<details>
<summary>Changes</summary>
This change includes `InferOpTypeInterface.td` in `NVVMOps.td` enabling result type inference for NVVM operations. This also fixes a python test for `nvvm.redux.sync` in `nvvm.py` due to a change in the python binding after enabling result type inference.
---
Full diff: https://github.com/llvm/llvm-project/pull/181781.diff
2 Files Affected:
- (modified) mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td (+1)
- (modified) mlir/test/python/dialects/nvvm.py (+2-2)
``````````diff
diff --git a/mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td b/mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
index 5cd4a1af1f881..b38b51a7794ba 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(
``````````
</details>
https://github.com/llvm/llvm-project/pull/181781
More information about the Mlir-commits
mailing list