Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/Pipelines/ArithmeticPipelineRegistration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,14 @@ BackendPipelineBuilder toOpenFhePipelineBuilder() {
auto configureCryptoContextOptions =
openfhe::ConfigureCryptoContextOptions{};
configureCryptoContextOptions.entryFunction = options.entryFunction;
configureCryptoContextOptions.mulDepth = options.mulDepth;
configureCryptoContextOptions.ringDim = options.ringDim;
configureCryptoContextOptions.batchSize = options.batchSize;
configureCryptoContextOptions.firstModSize = options.firstModSize;
configureCryptoContextOptions.scalingModSize = options.scalingModSize;
configureCryptoContextOptions.insecure = options.insecure;
configureCryptoContextOptions.scalingTechniqueFixedManual =
options.scalingTechniqueFixedManual;
pm.addPass(
openfhe::createConfigureCryptoContext(configureCryptoContextOptions));

Expand Down
23 changes: 23 additions & 0 deletions lib/Pipelines/ArithmeticPipelineRegistration.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,29 @@ struct BackendOptions : public PassPipelineOptions<BackendOptions> {
llvm::cl::desc("Insert function calls to an externally-defined debug "
"function (cf. --lwe-add-debug-port)"),
llvm::cl::init(false)};
PassOptions::Option<int> mulDepth{
*this, "mul-depth", llvm::cl::desc("Manually specify the mul depth"),
llvm::cl::init(0)};
PassOptions::Option<int> ringDim{
*this, "ring-dim", llvm::cl::desc("Manually specify the ring dimension"),
llvm::cl::init(0)};
PassOptions::Option<int> batchSize{
*this, "batch-size", llvm::cl::desc("Manually specify the batch size"),
llvm::cl::init(0)};
PassOptions::Option<int> firstModSize{
*this, "first-mod-size",
llvm::cl::desc("Manually specify the first mod size"), llvm::cl::init(0)};
PassOptions::Option<int> scalingModSize{
*this, "scaling-mod-size",
llvm::cl::desc("Manually specify the scaling mod size"),
llvm::cl::init(0)};
PassOptions::Option<bool> insecure{
*this, "insecure", llvm::cl::desc("Whether to use insecure parameter"),
llvm::cl::init(false)};
PassOptions::Option<bool> scalingTechniqueFixedManual{
*this, "scaling-technique-fixed-manual",
llvm::cl::desc("Whether to use fixed manual scaling technique"),
llvm::cl::init(false)};
};

using RLWEPipelineBuilder =
Expand Down
Loading