[Mlir-commits] [mlir] [mlir][python] Fix attribute registration in ir.py (PR #94615)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Jun 6 06:26:04 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: Egor Ospadov (eospadov)

<details>
<summary>Changes</summary>

This PR fixes attribute registration for `SI8Attr` and `UI8Attr` in `ir.py`.

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


1 Files Affected:

- (modified) mlir/python/mlir/ir.py (+2-2) 


``````````diff
diff --git a/mlir/python/mlir/ir.py b/mlir/python/mlir/ir.py
index 80c965b2d0eb2..a9ac765fe1c17 100644
--- a/mlir/python/mlir/ir.py
+++ b/mlir/python/mlir/ir.py
@@ -68,7 +68,7 @@ def _si1Attr(x, context):
 
 
 @register_attribute_builder("SI8Attr")
-def _i8Attr(x, context):
+def _si8Attr(x, context):
     return IntegerAttr.get(IntegerType.get_signed(8, context=context), x)
 
 
@@ -93,7 +93,7 @@ def _ui1Attr(x, context):
 
 
 @register_attribute_builder("UI8Attr")
-def _i8Attr(x, context):
+def _ui8Attr(x, context):
     return IntegerAttr.get(IntegerType.get_unsigned(8, context=context), x)
 
 

``````````

</details>


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


More information about the Mlir-commits mailing list