diff --git a/mlir/include/mlir/IR/BuiltinAttributes.td b/mlir/include/mlir/IR/BuiltinAttributes.td index 13ef16b42b695..74cba43e1c43a 100644 --- a/mlir/include/mlir/IR/BuiltinAttributes.td +++ b/mlir/include/mlir/IR/BuiltinAttributes.td @@ -153,7 +153,8 @@ def Builtin_DenseIntOrFPElementsAttr : Builtin_Attr< Syntax: ``` - dense-intorfloat-elements-attribute ::= `dense` `<` attribute-value `>` `:` + tensor-literal ::= integer-literal | float-literal | [] | [tensor-literal (, tensor-literal)* ] + dense-intorfloat-elements-attribute ::= `dense` `<` tensor-literal `>` `:` ( tensor-type | vector-type ) ``` diff --git a/mlir/lib/Parser/AttributeParser.cpp b/mlir/lib/Parser/AttributeParser.cpp index 8e6e9d25f8237..15d8b17fbdf3c 100644 --- a/mlir/lib/Parser/AttributeParser.cpp +++ b/mlir/lib/Parser/AttributeParser.cpp @@ -33,7 +33,7 @@ using namespace mlir::detail; /// | `[` (attribute-value (`,` attribute-value)*)? `]` /// | `{` (attribute-entry (`,` attribute-entry)*)? `}` /// | symbol-ref-id (`::` symbol-ref-id)* -/// | `dense` `<` attribute-value `>` `:` +/// | `dense` `<` tensor-literal `>` `:` /// (tensor-type | vector-type) /// | `sparse` `<` attribute-value `,` attribute-value `>` /// `:` (tensor-type | vector-type)