From a170aa581b83600c0bb6c315fef61a926ca76014 Mon Sep 17 00:00:00 2001 From: Jerry Wu Date: Tue, 29 Aug 2023 04:09:44 +0000 Subject: [PATCH] Check LHS batch pack --- compiler/src/iree/compiler/Codegen/LLVMCPU/KernelDispatch.cpp | 4 ++++ compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.cpp | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/src/iree/compiler/Codegen/LLVMCPU/KernelDispatch.cpp b/compiler/src/iree/compiler/Codegen/LLVMCPU/KernelDispatch.cpp index 6c33ad995634..1030dbfb82ea 100644 --- a/compiler/src/iree/compiler/Codegen/LLVMCPU/KernelDispatch.cpp +++ b/compiler/src/iree/compiler/Codegen/LLVMCPU/KernelDispatch.cpp @@ -1236,6 +1236,10 @@ getDefaultDistributionTileSizes(TilingInterface op) { } static bool isPackMatmulLHS(tensor::PackOp op) { + if (op.getSourceRank() == 3 && op.getInnerDimsPos().size() == 2 && + op.getInnerDimsPos()[0] == 1 && op.getInnerDimsPos()[1] == 2) { + return true; + } return op.getSourceRank() == 2 && op.getInnerDimsPos().size() == 2 && op.getInnerDimsPos()[0] == 0 && op.getInnerDimsPos()[1] == 1; } diff --git a/compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.cpp b/compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.cpp index 6cf535c1af01..cbec955942ae 100644 --- a/compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.cpp +++ b/compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.cpp @@ -513,10 +513,6 @@ void addMultiTilingExpertPassPipeline( addBufferizePasses(nestedModulePM); - // Perform memref-based transfer_read/write optimizations. - nestedModulePM.addNestedPass( - createOptimizeVectorTransferPass(/*flatten=*/false)); - // Run IREE specific passes before vector lowering expert. nestedModulePM.addNestedPass( createRemoveSingleIterationLoopPass());