[Mlir-commits] [mlir] [mlir][python] loosen infertype (PR #73620)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Nov 28 00:18:34 PST 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir-core

Author: Maksim Levental (makslevental)

<details>
<summary>Changes</summary>



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


1 Files Affected:

- (modified) mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp (+1-2) 


``````````diff
diff --git a/mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp b/mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp
index 0c0ad2cfeffdcc2..a32dfd2f7c54220 100644
--- a/mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp
@@ -582,8 +582,7 @@ static bool hasFirstAttrDerivedResultTypes(const Operator &op) {
 /// Returns true if the InferTypeOpInterface can be used to infer result types
 /// of the given operation.
 static bool hasInferTypeInterface(const Operator &op) {
-  return op.getTrait("::mlir::InferTypeOpInterface::Trait") &&
-         op.getNumRegions() == 0;
+  return op.getTrait("::mlir::InferTypeOpInterface::Trait");
 }
 
 /// Returns true if there is a trait or interface that can be used to infer

``````````

</details>


https://github.com/llvm/llvm-project/pull/73620


More information about the Mlir-commits mailing list