Skip to content

Commit

Permalink
add back fusion in reassociated quantized matmul
Browse files Browse the repository at this point in the history
  • Loading branch information
Max191 committed Dec 1, 2023
1 parent 2dc897a commit 40d58f0
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,14 @@ static LogicalResult reassociateDequantMatmul(RewriterBase &rewriter,

rewriter.replaceOp(matmul, reassociatedDequantization.getResult(0));

// Fuse dequantization + matmul ops into a single dispatch region
SmallVector<Operation *> dequantMatmulOps{quantizedIntegerMatmul,
reassociatedDequantization};
FailureOr<IREE::Flow::DispatchRegionOp> maybeDequantMatmulDispatch =
wrapConsecutiveOpsInDispatchRegion(rewriter, dequantMatmulOps);
if (failed(maybeDequantMatmulDispatch)) {
return failure();
}
return success();
}

Expand Down

0 comments on commit 40d58f0

Please sign in to comment.