"ValueRange":$outputs, "ArrayRef<AffineMap>":$indexingMaps,
"ArrayRef<StringRef>":$iteratorTypes, "StringRef":$doc,
"StringRef":$libraryCall,
- CArg<"function_ref<void(OpBuilder &, Location, ValueRange)>", "nullptr">,
- CArg<"ArrayRef<NamedAttribute>", "{}">:$attributes)>,
+ CArg<"function_ref<void(OpBuilder &, Location, ValueRange)>", "nullptr">)>,
OpBuilder<(ins "ValueRange":$inputs, "ValueRange":$outputBuffers,
"ArrayRef<AffineMap>":$indexingMaps, "ArrayRef<StringRef>":$iteratorTypes,
"StringRef":$doc, "StringRef":$libraryCall,
- CArg<"function_ref<void(OpBuilder &, Location, ValueRange)>", "nullptr">,
- CArg<"ArrayRef<NamedAttribute>", "{}">:$attributes)>,
+ CArg<"function_ref<void(OpBuilder &, Location, ValueRange)>", "nullptr">)>,
OpBuilder<(ins "TypeRange":$resultTensorTypes, "ValueRange":$inputs,
"ValueRange":$outputs, "ArrayRef<AffineMap>":$indexingMaps,
"ArrayRef<StringRef>":$iteratorTypes,
- CArg<"function_ref<void(OpBuilder &, Location, ValueRange)>", "nullptr">,
- CArg<"ArrayRef<NamedAttribute>", "{}">:$attributes)>,
+ CArg<"function_ref<void(OpBuilder &, Location, ValueRange)>", "nullptr">)>,
OpBuilder<(ins "ValueRange":$inputs, "ValueRange":$outputBuffers,
"ArrayRef<AffineMap>":$indexingMaps, "ArrayRef<StringRef>":$iteratorTypes,
- CArg<"function_ref<void(OpBuilder &, Location, ValueRange)>", "nullptr">,
- CArg<"ArrayRef<NamedAttribute>", "{}">:$attributes)>
+ CArg<"function_ref<void(OpBuilder &, Location, ValueRange)>", "nullptr">)>
];
let extraClassDeclaration = structuredOpsBaseDecls # [{
OpBuilder &builder, OperationState &result, TypeRange resultTensorTypes,
ValueRange inputs, ValueRange outputs, ArrayRef<AffineMap> indexingMaps,
ArrayRef<StringRef> iteratorTypes, StringRef doc, StringRef libraryCall,
- function_ref<void(OpBuilder &, Location, ValueRange)> bodyBuild,
- ArrayRef<NamedAttribute> attributes) {
+ function_ref<void(OpBuilder &, Location, ValueRange)> bodyBuild) {
build(builder, result, resultTensorTypes, inputs, outputs,
builder.getAffineMapArrayAttr(indexingMaps),
builder.getStrArrayAttr(iteratorTypes),
doc.empty() ? StringAttr() : builder.getStringAttr(doc),
libraryCall.empty() ? StringAttr()
: builder.getStringAttr(libraryCall));
- result.addAttributes(attributes);
if (!bodyBuild)
return;
OpBuilder &builder, OperationState &result, ValueRange inputs,
ValueRange outputs, ArrayRef<AffineMap> indexingMaps,
ArrayRef<StringRef> iteratorTypes, StringRef doc, StringRef libraryCall,
- function_ref<void(OpBuilder &, Location, ValueRange)> bodyBuild,
- ArrayRef<NamedAttribute> attributes) {
+ function_ref<void(OpBuilder &, Location, ValueRange)> bodyBuild) {
build(builder, result, TypeRange{}, inputs, outputs, indexingMaps,
- iteratorTypes, doc, libraryCall, bodyBuild, attributes);
+ iteratorTypes, doc, libraryCall, bodyBuild);
}
void GenericOp::build(
OpBuilder &builder, OperationState &result, ValueRange inputs,
ValueRange outputs, ArrayRef<AffineMap> indexingMaps,
ArrayRef<StringRef> iteratorTypes,
- function_ref<void(OpBuilder &, Location, ValueRange)> bodyBuild,
- ArrayRef<NamedAttribute> attributes) {
+ function_ref<void(OpBuilder &, Location, ValueRange)> bodyBuild) {
build(builder, result, inputs, outputs, indexingMaps, iteratorTypes,
/*doc=*/"",
- /*libraryCall=*/"", bodyBuild, attributes);
+ /*libraryCall=*/"", bodyBuild);
}
void GenericOp::build(
OpBuilder &builder, OperationState &result, TypeRange resultTensorTypes,
ValueRange inputs, ValueRange outputs, ArrayRef<AffineMap> indexingMaps,
ArrayRef<StringRef> iteratorTypes,
- function_ref<void(OpBuilder &, Location, ValueRange)> bodyBuild,
- ArrayRef<NamedAttribute> attributes) {
+ function_ref<void(OpBuilder &, Location, ValueRange)> bodyBuild) {
build(builder, result, resultTensorTypes, inputs, outputs, indexingMaps,
iteratorTypes,
/*doc=*/"",
- /*libraryCall=*/"", bodyBuild, attributes);
+ /*libraryCall=*/"", bodyBuild);
}
static void print(OpAsmPrinter &p, GenericOp op) {
// ODS-LABEL: def Test7Op
// ODS: OpBuilder<
// ODS: (ins "TypeRange":$resultTensorTypes, "ValueRange":$inputs,
-// ODS: "ValueRange":$outputs, "Attribute":$attr_a, "Attribute":$attr_b,
-// ODS: CArg<"ArrayRef<NamedAttribute>", "{}">:$attributes)
+// ODS: "ValueRange":$outputs, "Attribute":$attr_a, "Attribute":$attr_b)
// ODS: $_state.addAttribute("attr_a", attr_a);
// ODS: $_state.addAttribute("attr_b", attr_b);
//
# ODS-NEXT: $_builder.getI32VectorAttr({
# ODS-NEXT: static_cast<int32_t>(inputs.size()),
# ODS-NEXT: static_cast<int32_t>(outputs.size())}));
-# ODS-NEXT: $_state.addAttributes(attributes);
# ODS-NEXT: createAndFillStructuredOpRegion<Test1Op>(
# ODS-NEXT: $_builder,
# ODS-NEXT: $_state,
let skipDefaultBuilders = 1;
let builders = [
OpBuilder<
- (ins "ValueRange":$inputs, "ValueRange":$outputs,
- CArg<"ArrayRef<NamedAttribute>", "{{}">:$attributes),
+ (ins "ValueRange":$inputs, "ValueRange":$outputs),
[{{
$_state.addOperands(inputs);
$_state.addOperands(outputs);
$_builder.getI32VectorAttr({{
static_cast<int32_t>(inputs.size()),
static_cast<int32_t>(outputs.size())}));
- $_state.addAttributes(attributes);
createAndFillStructuredOpRegion<{0}>(
$_builder,
$_state,
}]>,
OpBuilder<
(ins "TypeRange":$resultTensorTypes, "ValueRange":$inputs,
- "ValueRange":$outputs,
- CArg<"ArrayRef<NamedAttribute>", "{{}">:$attributes),
+ "ValueRange":$outputs),
[{{
$_state.addOperands(inputs);
$_state.addOperands(outputs);
$_builder.getI32VectorAttr({{
static_cast<int32_t>(inputs.size()),
static_cast<int32_t>(outputs.size())}));
- $_state.addAttributes(attributes);
createAndFillStructuredOpRegion<{0}>(
$_builder,
$_state,
const char *builderFmt = R"FMT(
, OpBuilder<
(ins "TypeRange":$resultTensorTypes, "ValueRange":$inputs,
- "ValueRange":$outputs, {1},
- CArg<"ArrayRef<NamedAttribute>", "{{}">:$attributes),
+ "ValueRange":$outputs, {1}),
[{{
$_state.addOperands(inputs);
$_state.addOperands(outputs);
$_builder.getI32VectorAttr({{
static_cast<int32_t>(inputs.size()),
static_cast<int32_t>(outputs.size())}));
- $_state.addAttributes(attributes);
createAndFillStructuredOpRegion<{0}>(
$_builder,
$_state,
let skipDefaultBuilders = 1;
let builders = [
OpBuilder<
- (ins "ValueRange":$inputs, "ValueRange":$outputs,
- CArg<"ArrayRef<NamedAttribute>", "{{}">:$attributes),
+ (ins "ValueRange":$inputs, "ValueRange":$outputs),
[{{
$_state.addOperands(inputs);
$_state.addOperands(outputs);
$_builder.getI32VectorAttr({{
static_cast<int32_t>(inputs.size()),
static_cast<int32_t>(outputs.size())}));
- $_state.addAttributes(attributes);
createAndFillStructuredOpRegion<{0}>(
$_builder,
$_state,
static const char structuredOpBuilderFormat[] = R"FMT(
, OpBuilder<
(ins "TypeRange":$resultTensorTypes, "ValueRange":$inputs,
- "ValueRange":$outputs, {1},
- CArg<"ArrayRef<NamedAttribute>", "{{}">:$attributes),
+ "ValueRange":$outputs, {1}),
[{{
$_state.addOperands(inputs);
$_state.addOperands(outputs);
TypeRange(inputs),
TypeRange(outputs));
{2}
- $_state.addAttributes(attributes);
}]>
)FMT";