Skip to content

Commit

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

* SEAL 3.7.2

* bump version

* update SEAL tests

* drop python 3.6

* disable HEXL

* update tag

* update publish workflow

* drop test

* drop python 3.6

* debug HEXL crash

* bump version again
  • Loading branch information
bcebere authored Dec 20, 2021
1 parent af35c0f commit 937c260
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 31 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/pythonpublish-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ jobs:
strategy:
matrix:
python-version:
- cp36-cp36m
- cp37-cp37m
- cp38-cp38
- cp39-cp39
Expand All @@ -18,7 +17,7 @@ jobs:
container: quay.io/pypa/manylinux2014_x86_64

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
submodules: true
- name: Prepare ENV
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pythonpublish-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pythonpublish-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9]
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9]
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions cmake/seal.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ include(FetchContent)

set(SEAL_BUILD_DEPS ON)
set(SEAL_USE_MSGSL ON)
set(SEAL_USE_INTEL_HEXL ON)
set(SEAL_USE_INTEL_HEXL OFF)

FetchContent_Declare(
com_microsoft_seal
GIT_REPOSITORY https://github.com/microsoft/SEAL
GIT_TAG 6bfac481aae4057ea887d42eb0f24371e9b4c4f9 #v3.7.1
GIT_TAG v3.7.2 #v3.7.2
)
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 @@ -47,7 +47,7 @@ def run(self):

def build_extension(self, ext):
extdir = os.path.abspath(os.path.dirname(self.get_ext_fullpath(ext.name)))
hexl = "ON"
hexl = "OFF"
cmake_args = [
"-DSEAL_USE_INTEL_HEXL=" + hexl,
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=" + extdir,
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.1",
sha256 = "27446ea4fcea334faabc7439b1e312603ed700e3d26a45ec8408fd1d114374ec",
urls = ["https://github.com/microsoft/SEAL/archive/v3.7.1.tar.gz"],
strip_prefix = "SEAL-3.7.2",
sha256 = "12676de5766b8e2d641d6e45e92114ccdf8debd6f6d44b42a2ecc39a59b0bf13",
urls = ["https://github.com/microsoft/SEAL/archive/v3.7.2.tar.gz"],
)

if "com_xtensorstack_xtensor" not in native.existing_rules():
Expand Down
6 changes: 3 additions & 3 deletions tenseal/preload.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def tenseal_preload():

if "rules_python" not in native.existing_rules():
http_archive(
name = "rules_python",
sha256 = "b6d46438523a3ec0f3cead544190ee13223a52f6a6765a29eae7b7cc24cc83a0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.1.0/rules_python-0.1.0.tar.gz",
name = "rules_python",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.5.0/rules_python-0.5.0.tar.gz",
sha256 = "cd6730ed53a002c56ce4e2f396ba3b3be262fd7cb68339f0377a45e8227fe332",
)
2 changes: 1 addition & 1 deletion tenseal/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.6"
__version__ = "0.3.8"
15 changes: 0 additions & 15 deletions tests/python/sealapi/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,21 +122,6 @@ def test_util_croots():
assert croot.get_root(5) != 0


def test_util_polyarithsmallmod():
assert util.modulo_poly_coeffs([5, 6, 7, 8, 9], 5, sealapi.Modulus(2)) == [1, 0, 1, 0, 1]
assert util.negate_poly_coeffmod([1, 2], 2, sealapi.Modulus(5)) == [4, 3]
assert util.add_poly_coeffmod([1, 2], [1, 2], 2, sealapi.Modulus(5)) == [2, 4]
assert util.sub_poly_coeffmod([1, 2], [1, 2], 2, sealapi.Modulus(5)) == [0, 0]
assert util.multiply_poly_scalar_coeffmod([1, 2], 2, 3, sealapi.Modulus(5)) == [3, 1]
assert util.dyadic_product_coeffmod([5, 7], [2, 3], 2, sealapi.Modulus(5), 4) == [0, 1, 0, 0]
assert util.poly_infty_norm_coeffmod([5, 7], 2, sealapi.Modulus(5)) == 2
assert util.negacyclic_shift_poly_coeffmod([4, 3], 2, 1, sealapi.Modulus(5)) == [2, 4]
assert util.negacyclic_multiply_poly_mono_coeffmod([4, 3], 2, 2, 1, sealapi.Modulus(5)) == [
4,
3,
]


def test_util_polycore():
assert util.poly_to_hex_string([1, 2], 2, 1) == "2x^1 + 1"
assert util.poly_to_dec_string([1, 2], 2, 1) == "2x^1 + 1"
Expand Down

1 comment on commit 937c260

@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: 937c260 Previous: af35c0f Ratio
tests/python/benchmarks/test_mnist_eval.py::test_perf_mnist_eval_square1 118.65722322245308 iter/sec (stddev: 0.00044763163472738647) 276.1475560217584 iter/sec (stddev: 0.00006186892682107817) 2.33
tests/python/benchmarks/test_mnist_eval.py::test_perf_mnist_eval_fc1 0.41788464250883145 iter/sec (stddev: 0.0879320963226636) 0.857408340916583 iter/sec (stddev: 0.006544595880842634) 2.05
tests/python/benchmarks/test_mnist_eval.py::test_perf_mnist_eval_square2 233.1327216934137 iter/sec (stddev: 0.00022919922997682122) 530.9374265180059 iter/sec (stddev: 0.00010576095098332314) 2.28
tests/python/benchmarks/test_mnist_eval.py::test_perf_mnist_eval_fc2 3.8734349334635416 iter/sec (stddev: 0.000736560123310463) 8.027629616348994 iter/sec (stddev: 0.0005103320274115597) 2.07
tests/python/benchmarks/test_ops.py::test_perf_ckks_ops[1024-ckks_test-square] 236.56266461941905 iter/sec (stddev: 0.0003293481580065922) 483.94983282975755 iter/sec (stddev: 0.000020240633125991168) 2.05
tests/python/benchmarks/test_ops.py::test_perf_ckks_ops[1024-ckks_test-sub] 12245.87363022354 iter/sec (stddev: 0.000007004665457519263) 24721.585504954113 iter/sec (stddev: 0.000006433347497136693) 2.02
tests/python/benchmarks/test_ops.py::test_perf_ckks_ops[16384-ckks_test-square] 58.3650041884797 iter/sec (stddev: 0.001128010101041142) 120.39206707199756 iter/sec (stddev: 0.000026489796765365958) 2.06

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

Please sign in to comment.