feat(compiler/runtime): Support the pbs for crt encoding (enable apply_lookup_table up to 16bits)

This commit is contained in:
Quentin Bourgerie
2022-10-05 11:44:52 +02:00
parent 6a5e65631c
commit cf9a36c197
17 changed files with 924 additions and 35 deletions

View File

@@ -132,6 +132,20 @@ createClientParametersForV0(V0FHEContext fheContext,
},
};
}
if (v0Param.largeInteger.hasValue()) {
clientlib::PackingKeySwitchParam param;
param.inputSecretKeyID = clientlib::BIG_KEY;
param.outputSecretKeyID = clientlib::BIG_KEY;
param.level = v0Param.largeInteger->wopPBS.packingKeySwitch.level;
param.baseLog = v0Param.largeInteger->wopPBS.packingKeySwitch.baseLog;
param.bootstrapKeyID = clientlib::BOOTSTRAP_KEY;
c.packingKeys = {
{
"fpksk_v0",
param,
},
};
}
if (has_small_key) {
c.keyswitchKeys = {
{
@@ -146,6 +160,7 @@ createClientParametersForV0(V0FHEContext fheContext,
},
};
}
c.functionName = (std::string)functionName;
// Find the input function
auto rangeOps = module.getOps<mlir::func::FuncOp>();