Skip to content

Commit

Permalink
Repo sync (#798)
Browse files Browse the repository at this point in the history
  • Loading branch information
anakinxc authored Aug 5, 2024
1 parent 854f3ef commit e59187d
Show file tree
Hide file tree
Showing 13 changed files with 239 additions and 400 deletions.
262 changes: 0 additions & 262 deletions bazel/patches/seal.patch

This file was deleted.

28 changes: 6 additions & 22 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def spu_deps():
_com_github_emptoolkit_emp_tool()
_com_github_emptoolkit_emp_ot()
_com_github_facebook_zstd()
_com_github_microsoft_seal()
_com_github_eigenteam_eigen()
_com_github_nvidia_cutlass()
_yacl()
Expand All @@ -40,21 +39,21 @@ def _yacl():
http_archive,
name = "yacl",
urls = [
"https://github.com/secretflow/yacl/archive/refs/tags/0.4.5b3_nightly_20240722.tar.gz",
"https://github.com/secretflow/yacl/archive/refs/tags/0.4.5b4_nightly_20240731.tar.gz",
],
strip_prefix = "yacl-0.4.5b3_nightly_20240722",
sha256 = "ccca599e6ded6089c5afbb87c8f5e09383195af256caacd50089f0c7443e8604",
strip_prefix = "yacl-0.4.5b4_nightly_20240731",
sha256 = "952715bd56f6d9386984e9963426a1399bd2bd3702cf3efede9c82591cfab99b",
)

def _libpsi():
maybe(
http_archive,
name = "psi",
urls = [
"https://github.com/secretflow/psi/archive/refs/tags/v0.4.1.dev240722.tar.gz",
"https://github.com/secretflow/psi/archive/refs/tags/v0.4.0.dev240801.tar.gz",
],
strip_prefix = "psi-0.4.1.dev240722",
sha256 = "878cd8af2c7b9850944a27adf91f21dd4937d09d38e8365baad3b5165db8b39a",
strip_prefix = "psi-0.4.0.dev240801",
sha256 = "541ad74de0cd9e6bffe348c3bc97e659fccb1f1811e612f9d8e6b1debdd7c2a0",
)

def _rules_proto_grpc():
Expand Down Expand Up @@ -225,21 +224,6 @@ def _com_github_emptoolkit_emp_ot():
build_file = "@spulib//bazel:emp-ot.BUILD",
)

def _com_github_microsoft_seal():
maybe(
http_archive,
name = "com_github_microsoft_seal",
sha256 = "acc2a1a127a85d1e1ffcca3ffd148f736e665df6d6b072df0e42fff64795a13c",
strip_prefix = "SEAL-4.1.2",
type = "tar.gz",
patch_args = ["-p1"],
patches = ["@spulib//bazel:patches/seal.patch"],
urls = [
"https://github.com/microsoft/SEAL/archive/refs/tags/v4.1.2.tar.gz",
],
build_file = "@spulib//bazel:seal.BUILD",
)

def _com_github_eigenteam_eigen():
EIGEN_COMMIT = "66e8f38891841bf88ee976a316c0c78a52f0cee5"
EIGEN_SHA256 = "01fcd68409c038bbcfd16394274c2bf71e2bb6dda89a2319e23fc59a2da17210"
Expand Down
4 changes: 2 additions & 2 deletions experimental/squirrel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ Code under this folder is purely for research demonstration and it's **NOT desig
```sh
bazel-bin/experimental/squirrel/squirrel_demo_main --rank0_nfeatures=85 --rank1_nfeatures=85 --standalone=true --train=BinaryClassification_Aps_Test_60000_171.csv --test=BinaryClassification_Aps_Test_16000_171.csv --rank=1 --has_label=1 --lr=1.0 --subsample=0.8
```
* Run on distributed dataset, e.g., using the `breast_cancer` dataset from the SPU repo.

* Run on distributed dataset, e.g., using the `breast_cancer` dataset from the SPU repo.
* On one terminal

```sh
Expand All @@ -49,4 +50,3 @@ Code under this folder is purely for research demonstration and it's **NOT desig
```sh
bazel-bin/experimental/squirrel/squirrel_demo_main --rank0_nfeatures=15 --rank1_nfeatures=15 --standalone=false --train=examples/data/breast_cancer_b.csv --rank=1 --has_label=1 --lr=1.0 --subsample=0.8
```

4 changes: 2 additions & 2 deletions experimental/squirrel/bin_matvec_prot_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ TEST_P(BinMatVecProtTest, EmptyMat) {
});
NdArrayRef reveal = ring_add(out_shr[0], out_shr[1]);

DISPATCH_ALL_FIELDS(field, "", [&]() {
DISPATCH_ALL_FIELDS(field, [&]() {
using sT = std::make_signed<ring2k_t>::type;
NdArrayView<sT> _vec(vec);
auto expected = BinAccumuate<sT>(_vec, mat);
Expand Down Expand Up @@ -255,7 +255,7 @@ TEST_P(BinMatVecProtTest, WithEmptyIndicator) {
});
NdArrayRef reveal = ring_add(out_shr[0], out_shr[1]);

DISPATCH_ALL_FIELDS(field, "", [&]() {
DISPATCH_ALL_FIELDS(field, [&]() {
using sT = std::make_signed<ring2k_t>::type;
NdArrayView<sT> _vec(vec);
NdArrayView<sT> got(reveal);
Expand Down
Loading

0 comments on commit e59187d

Please sign in to comment.