forked from OSchip/llvm-project
[mlir][linalg] Add a builder for `linalg.(indexed_)generic`.
Differential Revision: https://reviews.llvm.org/D81610
This commit is contained in:
parent
1c3dd7bf37
commit
0f8d40f0d6
|
@ -565,6 +565,21 @@ class GenericOpBase<string mnemonic> : LinalgStructuredBase_Op<mnemonic,
|
|||
"No such thing as reference indexing maps for a generic op.");
|
||||
}
|
||||
}];
|
||||
|
||||
let builders = [
|
||||
OpBuilder<"OpBuilder &builder, OperationState &result, "
|
||||
"ArrayRef<Type> resultTypes, ValueRange args, "
|
||||
"int64_t inputCount, int64_t outputCount, "
|
||||
"ArrayRef<AffineMap> indexingMaps, "
|
||||
"ArrayRef<StringRef> iteratorTypes", [{
|
||||
return build(builder, result, resultTypes, args,
|
||||
builder.getI64IntegerAttr(inputCount),
|
||||
builder.getI64IntegerAttr(outputCount),
|
||||
builder.getAffineMapArrayAttr(indexingMaps),
|
||||
builder.getStrArrayAttr(iteratorTypes),
|
||||
/*doc=*/nullptr, /*library_call=*/nullptr);
|
||||
}]>];
|
||||
|
||||
let printer = [{ return ::print(p, *this); }];
|
||||
let parser = [{ return ::parseGenericOp(parser, result); }];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue