mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-27 15:14:31 +00:00
[mlir][Linalg] NFC - Refactor vectorization to be more composable
Differential Revision: https://reviews.llvm.org/D96116
This commit is contained in:
1 parent
7fe41ac3df
commit
0fcbbde2c7
4 files changed
+50
-39
No files matched your search
@@ -468,10 +468,13 @@ LogicalResult mlir::linalg::LinalgBaseVectorizationPattern::matchAndRewrite(
|
||||
return failure();
|
||||
if (failed(filter.checkAndNotify(rewriter, linalgOp)))
|
||||
return failure();
|
||||
if (failed(vectorizeLinalgOpPrecondition(op)))
|
||||
Optional<VectorizedLinalgOp> res = vectorizeLinalgOp(rewriter, op);
|
||||
if (!res)
|
||||
return failure();
|
||||
vectorizeLinalgOp(rewriter, op);
|
||||
rewriter.eraseOp(op);
|
||||
if (!res->tensorResults.empty())
|
||||
rewriter.replaceOp(op, res->tensorResults);
|
||||
else
|
||||
rewriter.eraseOp(op);
|
||||
return success();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user