[Mlir-commits] [mlir] d717b3d - [mlir][bytecode] Fix typo in DenseElementsAttr.

Jacques Pienaar llvmlistbot at llvm.org
Mon May 8 04:45:51 PDT 2023


Author: Jacques Pienaar
Date: 2023-05-08T04:45:30-07:00
New Revision: d717b3d987dfbcecfe8f9a9d570884eac4d6248f

URL: https://github.com/llvm/llvm-project/commit/d717b3d987dfbcecfe8f9a9d570884eac4d6248f
DIFF: https://github.com/llvm/llvm-project/commit/d717b3d987dfbcecfe8f9a9d570884eac4d6248f.diff

LOG: [mlir][bytecode] Fix typo in DenseElementsAttr.

Was incorrectly marked as DenseIntElementsAttr (only used for
SparseElementsAttr).

Added: 
    

Modified: 
    mlir/include/mlir/IR/BuiltinDialectBytecode.td
    mlir/test/Bytecode/general.mlir

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/IR/BuiltinDialectBytecode.td b/mlir/include/mlir/IR/BuiltinDialectBytecode.td
index b59f96c9fa9f7..29addb43e77ed 100644
--- a/mlir/include/mlir/IR/BuiltinDialectBytecode.td
+++ b/mlir/include/mlir/IR/BuiltinDialectBytecode.td
@@ -264,7 +264,7 @@ def DenseArrayAttr : DialectAttribute<(attr
 //  ///     data: blob
 //  ///   }
 //  kDenseIntOrFPElementsAttr = 18,
-def DenseElementsAttr : WithType<"DenseIntElementsAttr", Attribute>;
+def DenseElementsAttr : WithType<"DenseElementsAttr", Attribute>;
 def DenseIntOrFPElementsAttr : DialectAttribute<(attr
   ShapedType:$type,
   Blob:$rawData

diff  --git a/mlir/test/Bytecode/general.mlir b/mlir/test/Bytecode/general.mlir
index 957c35dee8002..5d707adf0ae38 100644
--- a/mlir/test/Bytecode/general.mlir
+++ b/mlir/test/Bytecode/general.mlir
@@ -6,6 +6,7 @@
 // CHECK-LABEL: "bytecode.test1"
 // CHECK-NEXT:    "bytecode.empty"() : () -> ()
 // CHECK-NEXT:    "bytecode.attributes"() {attra = 10 : i64, attrb = #bytecode.attr} : () -> ()
+// CHECK-NEXT{LITERAL}: "bytecode.sparse"() {value = sparse<[[2, 1], [1, 1], [1, 2]], [1.
 // CHECK-NEXT:    test.graph_region {
 // CHECK-NEXT:      "bytecode.operands"(%[[RESULTS:.*]]#0, %[[RESULTS]]#1, %[[RESULTS]]#2) : (i32, i64, i32) -> ()
 // CHECK-NEXT:      %[[RESULTS]]:3 = "bytecode.results"() : () -> (i32, i64, i32)
@@ -22,6 +23,7 @@
 "bytecode.test1"() ({
   "bytecode.empty"() : () -> ()
   "bytecode.attributes"() {attra = 10, attrb = #bytecode.attr} : () -> ()
+  %cst = "bytecode.sparse"() {value = sparse<[[2, 1], [1, 1], [1, 2]], [1.0, 5.0, 6.0]> : tensor<8x7xf32>} : () -> (tensor<8x7xf32>)
   test.graph_region {
     "bytecode.operands"(%results#0, %results#1, %results#2) : (i32, i64, i32) -> ()
     %results:3 = "bytecode.results"() : () -> (i32, i64, i32)


        


More information about the Mlir-commits mailing list