forked from OSchip/llvm-project
[mlir][Linalg] Add method to check if LinalgTransformationFilter has been applied.
Differential Revision: https://reviews.llvm.org/D114170
This commit is contained in:
parent
27ea67136e
commit
d26beb0be2
|
@ -437,6 +437,7 @@ struct LinalgTransformationFilter {
|
|||
LogicalResult checkAndNotify(PatternRewriter &rewriter, Operation *op) const;
|
||||
void replaceLinalgTransformationFilter(PatternRewriter &rewriter,
|
||||
Operation *op) const;
|
||||
bool hasReplacementFilter(Operation *op) const;
|
||||
|
||||
LinalgTransformationFilter &addFilter(FilterFunction f) {
|
||||
if (f)
|
||||
|
|
|
@ -107,6 +107,15 @@ void mlir::linalg::LinalgTransformationFilter::
|
|||
rewriter.getStringAttr(LinalgTransforms::kLinalgTransformMarker));
|
||||
}
|
||||
|
||||
bool mlir::linalg::LinalgTransformationFilter::hasReplacementFilter(
|
||||
Operation *op) const {
|
||||
if (!replacement)
|
||||
return false;
|
||||
auto attr = op->getAttr(LinalgTransforms::kLinalgTransformMarker)
|
||||
.dyn_cast<StringAttr>();
|
||||
return attr && attr == replacement.getValue();
|
||||
}
|
||||
|
||||
LinalgTilingOptions &
|
||||
mlir::linalg::LinalgTilingOptions::setTileSizes(ArrayRef<int64_t> ts) {
|
||||
assert(!tileSizeComputationFunction && "tile sizes already set");
|
||||
|
|
Loading…
Reference in New Issue