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

Reviewed By: gysit

Differential Revision: https://reviews.llvm.org/D108182
This commit is contained in:
MaheshRavishankar 2021-08-17 08:59:13 -07:00
parent 78cb1adc5c
commit 836649e040
1 changed files with 3 additions and 1 deletions

View File

@ -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({{