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

Matthias Springer llvmlistbot at llvm.org
Fri Jun 19 00:29:42 PDT 2026


https://github.com/matthias-springer created https://github.com/llvm/llvm-project/pull/204739

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


>From cd520a0812587c8f4599470517cdcfc0d039c8b1 Mon Sep 17 00:00:00 2001
From: Matthias Springer <me at m-sp.org>
Date: Fri, 19 Jun 2026 07:28:35 +0000
Subject: [PATCH] [mlir][IR] Fix typo in code example of DenseTypedElementsAttr

---
 mlir/include/mlir/IR/BuiltinAttributes.td | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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,



More information about the Mlir-commits mailing list