[Mlir-commits] [mlir] 836649e - Allow setting attributes in build method generated by YAML-gen.

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Aug 17 09:10:16 PDT 2021


Author: MaheshRavishankar
Date: 2021-08-17T09:09:52-07:00
New Revision: 836649e04040251644cdd94d4eb033091e1dc220

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

LOG: Allow setting attributes in build method generated by YAML-gen.

Reviewed By: gysit

Differential Revision: https://reviews.llvm.org/D108182

Added: 
    

Modified: 
    mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp b/mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp
index 83447f4930170..b95603056da3f 100644
--- a/mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp
+++ b/mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp
@@ -474,11 +474,13 @@ def {0} : LinalgStructuredBase_Op<"{1}", !listconcat([
       }]>,
       OpBuilder<
       (ins "TypeRange":$resultTensorTypes, "ValueRange":$inputs,
-            "ValueRange":$outputs),
+            "ValueRange":$outputs,
+            CArg<"ArrayRef<NamedAttribute>", "{{}">:$attributes),
       [{{
         $_state.addOperands(inputs);
         $_state.addOperands(outputs);
         $_state.addTypes(resultTensorTypes);
+        $_state.addAttributes(attributes);
         $_state.addAttribute(
           "operand_segment_sizes",
           $_builder.getI32VectorAttr({{


        


More information about the Mlir-commits mailing list