Skip to content

Commit 691373b

Browse files
authored
SEAL 4.0 (#381)
* master -> main * SEAL 4.0 * linting * update tests
1 parent 937c260 commit 691373b

File tree

7 files changed

+14
-13
lines changed

7 files changed

+14
-13
lines changed

cmake/seal.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set(SEAL_USE_INTEL_HEXL OFF)
77
FetchContent_Declare(
88
com_microsoft_seal
99
GIT_REPOSITORY https://github.com/microsoft/SEAL
10-
GIT_TAG v3.7.2 #v3.7.2
10+
GIT_TAG v4.0.0 #v4.0.0
1111
)
1212
FetchContent_MakeAvailable(com_microsoft_seal)
1313

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def build_extension(self, ext):
6464
build_args += ["--", "/m", "/p:TrackFileAccess=false"]
6565
else:
6666
cmake_args += ["-DCMAKE_BUILD_TYPE=" + cfg]
67-
build_args += ["--", "-j", "2"]
67+
build_args += ["--", "-j"]
6868

6969
env = os.environ.copy()
7070
env["CXXFLAGS"] = '{} -DVERSION_INFO=\\"{}\\"'.format(

tenseal/deps.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ def tenseal_deps():
2626
http_archive(
2727
name = "com_microsoft_seal",
2828
build_file = "//third_party:seal.BUILD",
29-
strip_prefix = "SEAL-3.7.2",
30-
sha256 = "12676de5766b8e2d641d6e45e92114ccdf8debd6f6d44b42a2ecc39a59b0bf13",
31-
urls = ["https://github.com/microsoft/SEAL/archive/v3.7.2.tar.gz"],
29+
strip_prefix = "SEAL-4.0.0",
30+
sha256 = "616653498ba8f3e0cd23abef1d451c6e161a63bd88922f43de4b3595348b5c7e",
31+
urls = ["https://github.com/microsoft/SEAL/archive/v4.0.0.tar.gz"],
3232
)
3333

3434
if "com_xtensorstack_xtensor" not in native.existing_rules():

tenseal/sealapi/sealapi_modulus.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ void bind_seal_modulus(pybind11::module &m) {
6464
py::class_<CoeffModulus>(m, "CoeffModulus")
6565
.def_static("MaxBitCount", &CoeffModulus::MaxBitCount)
6666
.def_static("BFVDefault", &CoeffModulus::BFVDefault)
67-
.def_static("Create", &CoeffModulus::Create);
67+
.def_static("Create", py::overload_cast<std::size_t, std::vector<int>>(
68+
&CoeffModulus::Create));
6869

6970
py::class_<PlainModulus>(m, "PlainModulus")
7071
.def_static("Batching", py::overload_cast<std::size_t, int>(

tenseal/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.3.8"
1+
__version__ = "0.3.9"

tests/python/sealapi/test_sanity.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ def test_serialization_sanity():
2323
header = sealapi.Serialization.SEALHeader()
2424
assert header.magic == 0xA15E
2525
assert header.header_size == 0x10
26-
assert header.version_major == 3
27-
assert header.version_minor == 0x7
26+
assert header.version_major == 4
27+
assert header.version_minor == 0
2828
assert header.compr_mode == sealapi.COMPR_MODE_TYPE.NONE
2929
assert header.size == 0
3030
assert header.reserved == 0

third_party/seal.BUILD

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ cmake_external(
2323
"make",
2424
"make install",
2525
],
26-
out_include_dir = "include/SEAL-3.7",
27-
static_libraries = ["libseal-3.7.a"],
26+
out_include_dir = "include/SEAL-4.0",
27+
static_libraries = ["libseal-4.0.a"],
2828
visibility = ["//visibility:public"],
2929
)
3030

@@ -44,8 +44,8 @@ cmake_external(
4444
install_prefix = "native/src",
4545
lib_source = ":src",
4646
make_commands = ["make"],
47-
out_include_dir = "include/SEAL-3.7",
48-
static_libraries = ["libseal-3.7.a"],
47+
out_include_dir = "include/SEAL-4.0",
48+
static_libraries = ["libseal-4.0.a"],
4949
visibility = ["//visibility:public"],
5050
)
5151

0 commit comments

Comments
 (0)