[mlir] [VectorOps] Progressively lower vector.outerproduct to LLVM
Summary: This replaces the direct lowering of vector.outerproduct to LLVM with progressive lowering into elementary vectors ops to avoid having the similar lowering logic at several places. NOTE1: with the new progressive rule, the lowered llvm is slightly more elaborate than with the direct lowering, but the generated assembly is just as optimized; still if we want to stay closer to the original, we should add a "broadcast on extract" to shuffle rewrite (rather than special cases all the lowering steps) NOTE2: the original outerproduct lowering code should now be removed but some linalg test work directly on vector and contain some dead code, so this requires another CL Reviewers: nicolasvasilache, andydavis1 Reviewed By: nicolasvasilache, andydavis1 Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D75956
This commit is contained in:
@@ -817,6 +817,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
// TODO(ajcbik): remove this rule once LinAlg tests are cleaned up
|
||||
class VectorOuterProductOpConversion : public ConvertToLLVMPattern {
|
||||
public:
|
||||
explicit VectorOuterProductOpConversion(MLIRContext *context,
|
||||
@@ -1176,7 +1177,7 @@ struct LowerVectorToLLVMPass : public ModulePass<LowerVectorToLLVMPass> {
|
||||
} // namespace
|
||||
|
||||
void LowerVectorToLLVMPass::runOnModule() {
|
||||
// Perform progressive lowering of operations on "slices" and
|
||||
// Perform progressive lowering of operations on slices and
|
||||
// all contraction operations. Also applies folding and DCE.
|
||||
{
|
||||
OwningRewritePatternList patterns;
|
||||
|
||||
Reference in New Issue
Block a user