Skip to content

Commit 84a11f6

Browse files
180 dev branchs ci fails (#182)
* Fixed compiler bugs * Disabled a compiler flag --------- Co-authored-by: Dmitriy Suponitskiy <[email protected]>
1 parent 79d5dac commit 84a11f6

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ endif()
1717
find_package(OpenFHE 1.2.1 REQUIRED)
1818
find_package(pybind11 REQUIRED)
1919

20-
set( CMAKE_CXX_FLAGS ${OpenFHE_CXX_FLAGS} )
20+
# "CMAKE_INTERPROCEDURAL_OPTIMIZATION ON" (ON is the default value) causes link failure. see
21+
# https://github.com/openfheorg/openfhe-python/actions/runs/11492843373/job/31987579944
22+
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION OFF)
23+
2124
set( OpenFHE_Py_SOURCES src/lib)
2225
set( OpenFHE_Py_INCLUDES src/include)
2326

src/lib/binfhe_bindings.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
#include "binfhecontext_docs.h"
3333
#include "binfhecontext_wrapper.h"
3434
#include "openfhe.h"
35-
#include "openfhe/cereal/archives/binary.hpp"
36-
#include "openfhe/cereal/archives/portable_binary.hpp"
37-
#include "openfhe/core/utils/serial.h"
35+
#include "cereal/archives/binary.hpp"
36+
#include "cereal/archives/portable_binary.hpp"
37+
#include "core/utils/serial.h"
3838
#include <iostream>
3939
#include <pybind11/operators.h>
4040
#include <pybind11/pybind11.h>
@@ -184,15 +184,15 @@ void bind_binfhe_context(py::module &m) {
184184
py::arg("sk"), py::arg("ct"), py::arg("p") = 4)
185185
.def("EvalBinGate",
186186
static_cast<LWECiphertext (BinFHEContext::*)(
187-
BINGATE, ConstLWECiphertext &, ConstLWECiphertext &) const>(
187+
BINGATE, ConstLWECiphertext &, ConstLWECiphertext &, bool) const>(
188188
&BinFHEContext::EvalBinGate),
189189
binfhe_EvalBinGate_docs, py::arg("gate"), py::arg("ct1"),
190-
py::arg("ct2"))
190+
py::arg("ct2"), py::arg("extended") = false)
191191
.def("EvalBinGate",
192192
static_cast<LWECiphertext (BinFHEContext::*)(
193-
BINGATE, const std::vector<LWECiphertext> &) const>(
193+
BINGATE, const std::vector<LWECiphertext> &, bool) const>(
194194
&BinFHEContext::EvalBinGate),
195-
py::arg("gate"), py::arg("ctvector"))
195+
py::arg("gate"), py::arg("ctvector"), py::arg("extended") = false)
196196
.def("EvalNOT", &BinFHEContext::EvalNOT, binfhe_EvalNOT_docs,
197197
py::arg("ct"))
198198
.def("Getn", &GetnWrapper)
@@ -212,7 +212,7 @@ void bind_binfhe_context(py::module &m) {
212212
.def("EvalNOT", &BinFHEContext::EvalNOT)
213213
.def("EvalConstant", &BinFHEContext::EvalConstant)
214214
.def("ClearBTKeys", &BinFHEContext::ClearBTKeys)
215-
.def("Bootstrap", &BinFHEContext::Bootstrap, py::arg("ct"))
215+
.def("Bootstrap", &BinFHEContext::Bootstrap, py::arg("ct"), py::arg("extended") = false)
216216
.def("SerializedVersion", &BinFHEContext::SerializedVersion,
217217
binfhe_SerializedVersion_docs)
218218
.def("SerializedObjectName", &BinFHEContext::SerializedObjectName,

src/lib/pke/serialization.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ template <typename ST>
4747
bool SerializeEvalMultKeyWrapper(const std::string &filename, const ST &sertype, std::string id)
4848
{
4949
std::ofstream outfile(filename, std::ios::out | std::ios::binary);
50-
bool res;
51-
res = CryptoContextImpl<DCRTPoly>::SerializeEvalMultKey<ST>(outfile, sertype, id);
50+
bool res = CryptoContextImpl<DCRTPoly>::SerializeEvalMultKey<ST>(outfile, sertype, id);
5251
outfile.close();
5352
return res;
5453
}
@@ -57,8 +56,7 @@ template <typename ST>
5756
bool SerializeEvalAutomorphismKeyWrapper(const std::string& filename, const ST& sertype, std::string id)
5857
{
5958
std::ofstream outfile(filename, std::ios::out | std::ios::binary);
60-
bool res;
61-
res = CryptoContextImpl<DCRTPoly>::SerializeEvalAutomorphismKey<ST>(outfile, sertype, id);
59+
bool res = CryptoContextImpl<DCRTPoly>::SerializeEvalAutomorphismKey<ST>(outfile, sertype, id);
6260
outfile.close();
6361
return res;
6462
}
@@ -71,8 +69,7 @@ bool DeserializeEvalMultKeyWrapper(const std::string &filename, const ST &sertyp
7169
{
7270
std::cerr << "I cannot read serialization from " << filename << std::endl;
7371
}
74-
bool res;
75-
res = CryptoContextImpl<DCRTPoly>::DeserializeEvalMultKey<ST>(emkeys, sertype);
72+
bool res = CryptoContextImpl<DCRTPoly>::DeserializeEvalMultKey<ST>(emkeys, sertype);
7673
return res; }
7774

7875
template <typename T, typename ST>

0 commit comments

Comments
 (0)