mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-17 08:01:20 -05:00
feat(frontend-python): Expose compress_input_ciphertexts as a compilation options and tests
This commit is contained in:
@@ -713,6 +713,10 @@ void mlir::concretelang::python::populateCompilerAPISubmodule(
|
||||
[](CompilationOptions &options, bool b) {
|
||||
options.compressEvaluationKeys = b;
|
||||
})
|
||||
.def("set_compress_input_ciphertexts",
|
||||
[](CompilationOptions &options, bool b) {
|
||||
options.compressInputCiphertexts = b;
|
||||
})
|
||||
.def("set_optimize_concrete", [](CompilationOptions &options,
|
||||
bool b) { options.optimizeTFHE = b; })
|
||||
.def("set_p_error",
|
||||
|
||||
@@ -113,6 +113,19 @@ class CompilationOptions(WrapperCpp):
|
||||
raise TypeError("can't set the option to a non-boolean value")
|
||||
self.cpp().set_compress_evaluation_keys(compress_evaluation_keys)
|
||||
|
||||
def set_compress_input_ciphertexts(self, compress_input_ciphertexts: bool):
|
||||
"""Set option for compression of input ciphertexts.
|
||||
|
||||
Args:
|
||||
compress_input_ciphertexts (bool): whether to turn it on or off
|
||||
|
||||
Raises:
|
||||
TypeError: if the value to set is not boolean
|
||||
"""
|
||||
if not isinstance(compress_input_ciphertexts, bool):
|
||||
raise TypeError("can't set the option to a non-boolean value")
|
||||
self.cpp().set_compress_input_ciphertexts(compress_input_ciphertexts)
|
||||
|
||||
def set_verify_diagnostics(self, verify_diagnostics: bool):
|
||||
"""Set option for diagnostics verification.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user