mirror of
https://github.com/zama-ai/concrete.git
synced 2026-04-17 03:00:54 -04:00
feat(compiler): Add support for tiling of FHELinalg.apply_lookup_table
This commit is contained in:
@@ -697,6 +697,9 @@ struct FHELinalgApplyLookupTableToLinalgGeneric
|
||||
outs, maps, iteratorTypes, doc,
|
||||
call, bodyBuilder);
|
||||
|
||||
if (lutOp->hasAttr("tile-sizes"))
|
||||
genericOp->setAttr("tile-sizes", lutOp->getAttr("tile-sizes"));
|
||||
|
||||
rewriter.replaceOp(lutOp, {genericOp.getResult(0)});
|
||||
|
||||
return ::mlir::success();
|
||||
|
||||
@@ -185,8 +185,12 @@ public:
|
||||
mlir::ArrayAttr tileAttr =
|
||||
mlir::Builder(&this->getContext()).getI64ArrayAttr(tileSizes);
|
||||
|
||||
op->walk([&](mlir::concretelang::FHELinalg::MatMulEintIntOp matmulOp) {
|
||||
matmulOp.getOperation()->setAttr("tile-sizes", tileAttr);
|
||||
op->walk([&](mlir::Operation *op) {
|
||||
if (llvm::isa<mlir::concretelang::FHELinalg::ApplyLookupTableEintOp>(
|
||||
op) ||
|
||||
llvm::isa<mlir::concretelang::FHELinalg::MatMulEintIntOp>(op)) {
|
||||
op->setAttr("tile-sizes", tileAttr);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user