From ab75999364648e3435c6c641980980736d5f56c2 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 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/src/iree/compiler/Codegen/LLVMCPU/KernelDispatch.cpp b/compiler/src/iree/compiler/Codegen/LLVMCPU/KernelDispatch.cpp index 6c33ad9956344..1030dbfb82ea6 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; }