[Mlir-commits] [mlir] [NFC][mlir][emitc] fix misspelling in description of emitc.global (PR #115548)
Andrey Timonin
llvmlistbot at llvm.org
Fri Nov 8 14:58:22 PST 2024
https://github.com/EtoAndruwa updated https://github.com/llvm/llvm-project/pull/115548
>From b4d2c5dc5ec2999fa8a96a52b40164ced633b992 Mon Sep 17 00:00:00 2001
From: EtoAndruwa <timonina1909 at gmail.com>
Date: Sat, 9 Nov 2024 00:52:19 +0300
Subject: [PATCH 1/3] [NFC][mlir][emitc] fix misspelling in description of
emitc.global
---
mlir/include/mlir/Dialect/EmitC/IR/EmitC.td | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mlir/include/mlir/Dialect/EmitC/IR/EmitC.td b/mlir/include/mlir/Dialect/EmitC/IR/EmitC.td
index 7c84ab4dd39eb7..91916c1c4493dd 100644
--- a/mlir/include/mlir/Dialect/EmitC/IR/EmitC.td
+++ b/mlir/include/mlir/Dialect/EmitC/IR/EmitC.td
@@ -1110,9 +1110,9 @@ def EmitC_GlobalOp : EmitC_Op<"global", [Symbol]> {
```mlir
// Global variable with an initial value.
- emitc.global @x : emitc.array<2xf32> = dense<0.0, 2.0>
+ emitc.global @x : !emitc.array<2xf32> = dense<0.0, 2.0>
// External global variable
- emitc.global extern @x : emitc.array<2xf32>
+ emitc.global extern @x : !emitc.array<2xf32>
// Constant global variable with internal linkage
emitc.global static const @x : i32 = 0
```
>From cf88e6936de38cc10ba80ec7f75004f05c212a08 Mon Sep 17 00:00:00 2001
From: EtoAndruwa <timonina1909 at gmail.com>
Date: Sat, 9 Nov 2024 01:30:28 +0300
Subject: [PATCH 2/3] [NFC][mlir][emitc] fix wrong usage of 'dense' in the
description
---
mlir/include/mlir/Dialect/EmitC/IR/EmitC.td | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mlir/include/mlir/Dialect/EmitC/IR/EmitC.td b/mlir/include/mlir/Dialect/EmitC/IR/EmitC.td
index 91916c1c4493dd..95da27e10e5472 100644
--- a/mlir/include/mlir/Dialect/EmitC/IR/EmitC.td
+++ b/mlir/include/mlir/Dialect/EmitC/IR/EmitC.td
@@ -1110,7 +1110,7 @@ def EmitC_GlobalOp : EmitC_Op<"global", [Symbol]> {
```mlir
// Global variable with an initial value.
- emitc.global @x : !emitc.array<2xf32> = dense<0.0, 2.0>
+ emitc.global @x : !emitc.array<2xf32> = dense<0.0>
// External global variable
emitc.global extern @x : !emitc.array<2xf32>
// Constant global variable with internal linkage
>From 9a7e7af26ecd02255e3e6b562521c35ea025aa34 Mon Sep 17 00:00:00 2001
From: EtoAndruwa <timonina1909 at gmail.com>
Date: Sat, 9 Nov 2024 01:58:10 +0300
Subject: [PATCH 3/3] [NFC][mlir][emitc] add right example for global array
initialization
---
mlir/include/mlir/Dialect/EmitC/IR/EmitC.td | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mlir/include/mlir/Dialect/EmitC/IR/EmitC.td b/mlir/include/mlir/Dialect/EmitC/IR/EmitC.td
index 95da27e10e5472..071541fa98950f 100644
--- a/mlir/include/mlir/Dialect/EmitC/IR/EmitC.td
+++ b/mlir/include/mlir/Dialect/EmitC/IR/EmitC.td
@@ -1111,6 +1111,8 @@ def EmitC_GlobalOp : EmitC_Op<"global", [Symbol]> {
```mlir
// Global variable with an initial value.
emitc.global @x : !emitc.array<2xf32> = dense<0.0>
+ // Global variable with an initial values.
+ emitc.global @x : !emitc.array<3xi32> = dense<[0, 1, 2]>
// External global variable
emitc.global extern @x : !emitc.array<2xf32>
// Constant global variable with internal linkage
More information about the Mlir-commits
mailing list