Skip to content

Commit

Permalink
SEAL 4.0 (#381)
Browse files Browse the repository at this point in the history
* master -> main

* SEAL 4.0

* linting

* update tests
  • Loading branch information
bcebere authored Mar 18, 2022
1 parent 937c260 commit 691373b
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion cmake/seal.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set(SEAL_USE_INTEL_HEXL OFF)
FetchContent_Declare(
com_microsoft_seal
GIT_REPOSITORY https://github.com/microsoft/SEAL
GIT_TAG v3.7.2 #v3.7.2
GIT_TAG v4.0.0 #v4.0.0
)
FetchContent_MakeAvailable(com_microsoft_seal)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def build_extension(self, ext):
build_args += ["--", "/m", "/p:TrackFileAccess=false"]
else:
cmake_args += ["-DCMAKE_BUILD_TYPE=" + cfg]
build_args += ["--", "-j", "2"]
build_args += ["--", "-j"]

env = os.environ.copy()
env["CXXFLAGS"] = '{} -DVERSION_INFO=\\"{}\\"'.format(
Expand Down
6 changes: 3 additions & 3 deletions tenseal/deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ def tenseal_deps():
http_archive(
name = "com_microsoft_seal",
build_file = "//third_party:seal.BUILD",
strip_prefix = "SEAL-3.7.2",
sha256 = "12676de5766b8e2d641d6e45e92114ccdf8debd6f6d44b42a2ecc39a59b0bf13",
urls = ["https://github.com/microsoft/SEAL/archive/v3.7.2.tar.gz"],
strip_prefix = "SEAL-4.0.0",
sha256 = "616653498ba8f3e0cd23abef1d451c6e161a63bd88922f43de4b3595348b5c7e",
urls = ["https://github.com/microsoft/SEAL/archive/v4.0.0.tar.gz"],
)

if "com_xtensorstack_xtensor" not in native.existing_rules():
Expand Down
3 changes: 2 additions & 1 deletion tenseal/sealapi/sealapi_modulus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ void bind_seal_modulus(pybind11::module &m) {
py::class_<CoeffModulus>(m, "CoeffModulus")
.def_static("MaxBitCount", &CoeffModulus::MaxBitCount)
.def_static("BFVDefault", &CoeffModulus::BFVDefault)
.def_static("Create", &CoeffModulus::Create);
.def_static("Create", py::overload_cast<std::size_t, std::vector<int>>(
&CoeffModulus::Create));

py::class_<PlainModulus>(m, "PlainModulus")
.def_static("Batching", py::overload_cast<std::size_t, int>(
Expand Down
2 changes: 1 addition & 1 deletion tenseal/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.8"
__version__ = "0.3.9"
4 changes: 2 additions & 2 deletions tests/python/sealapi/test_sanity.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def test_serialization_sanity():
header = sealapi.Serialization.SEALHeader()
assert header.magic == 0xA15E
assert header.header_size == 0x10
assert header.version_major == 3
assert header.version_minor == 0x7
assert header.version_major == 4
assert header.version_minor == 0
assert header.compr_mode == sealapi.COMPR_MODE_TYPE.NONE
assert header.size == 0
assert header.reserved == 0
Expand Down
8 changes: 4 additions & 4 deletions third_party/seal.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ cmake_external(
"make",
"make install",
],
out_include_dir = "include/SEAL-3.7",
static_libraries = ["libseal-3.7.a"],
out_include_dir = "include/SEAL-4.0",
static_libraries = ["libseal-4.0.a"],
visibility = ["//visibility:public"],
)

Expand All @@ -44,8 +44,8 @@ cmake_external(
install_prefix = "native/src",
lib_source = ":src",
make_commands = ["make"],
out_include_dir = "include/SEAL-3.7",
static_libraries = ["libseal-3.7.a"],
out_include_dir = "include/SEAL-4.0",
static_libraries = ["libseal-4.0.a"],
visibility = ["//visibility:public"],
)

Expand Down

1 comment on commit 691373b

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Python-Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 691373b Previous: 937c260 Ratio
tests/python/benchmarks/test_ops.py::test_perf_ckks_plain_ops[4096-ckks_test-multiply] 208.38135481650616 iter/sec (stddev: 0.003469666190769388) 445.64138173829684 iter/sec (stddev: 0.000015146367399711247) 2.14
tests/python/benchmarks/test_ops.py::test_perf_ckks_plain_ops[4096-ckks_test-dot] 18.36041487121467 iter/sec (stddev: 0.013525821849875688) 39.61255872156752 iter/sec (stddev: 0.00011139075110619368) 2.16

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.