[Mlir-commits] [mlir] [mlir][IR] Fix typo in code example of DenseTypedElementsAttr (PR #204739)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Jun 19 00:30:26 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir-ods

Author: Matthias Springer (matthias-springer)

<details>
<summary>Changes</summary>

There was a typo in the type-first syntax code example.


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


1 Files Affected:

- (modified) mlir/include/mlir/IR/BuiltinAttributes.td (+1-1) 


``````````diff
diff --git a/mlir/include/mlir/IR/BuiltinAttributes.td b/mlir/include/mlir/IR/BuiltinAttributes.td
index 6165a24c0d34f..f238137734d56 100644
--- a/mlir/include/mlir/IR/BuiltinAttributes.td
+++ b/mlir/include/mlir/IR/BuiltinAttributes.td
@@ -271,7 +271,7 @@ def Builtin_DenseTypedElementsAttr : Builtin_Attr<
     dense<tensor<2xi32> : 10 : i32>
 
     // Type-first syntax: A tensor of 2 float32 elements.
-    dense<tensor<2xf32> : [10.0, 11.0]>
+    dense<tensor<2xf32> : [10.0 : f32, 11.0 : f32]>
     ```
 
     Note: The literal-first syntax is supported only for complex, float, index,

``````````

</details>


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


More information about the Mlir-commits mailing list