Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/worldcoin/gpu-iris-mpc into…
Browse files Browse the repository at this point in the history
… ps/feat/collect-matches
  • Loading branch information
philsippl committed Aug 19, 2024
2 parents d186d29 + c8caa4b commit 88bc68f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
13 changes: 7 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ aws-sdk-kms = { version = "1.37.0" }
aws-sdk-sns = { version = "1.37.0" }
aws-sdk-sqs = { version = "1.36.0" }
aws-sdk-s3 = { version = "1.42.0" }
aws-sdk-secretsmanager = { version = "1.40.0" }
aws-sdk-secretsmanager = { version = "1.41.0" }
axum = "0.7"
clap = { version = "4", features = ["derive", "env"] }
base64 = "0.22.1"
Expand Down
5 changes: 2 additions & 3 deletions iris-mpc-gpu/src/dot/kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,9 @@ extern "C" __global__ void mergeBatchResults(unsigned long long *matchResultsSel
bool matchLeft = (matchResultsSelfLeft[idx] & (1ULL << i));
bool matchRight = (matchResultsSelfRight[idx] & (1ULL << i));

if (matchLeft || matchRight)
{
// Current *AND* policy: only match if both eyes match
if (matchLeft && matchRight)
atomicMin(&finalResults[queryIdx], UINT_MAX - 1);
}
}
}
}
7 changes: 6 additions & 1 deletion iris-mpc/src/bin/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,11 @@ async fn server_main(config: Config) -> eyre::Result<()> {
};

if let Some(db_len) = sync_result.must_rollback_storage() {
tracing::warn!(
"Databases are out-of-sync, rolling back (current len: {}, new len: {})",
store_len,
db_len
);
// Rollback the data that we have already loaded.
let bit_len = db_len * IRIS_CODE_LENGTH;
// TODO: remove the line below if you removed fake data.
Expand All @@ -454,7 +459,7 @@ async fn server_main(config: Config) -> eyre::Result<()> {
device_manager,
comms,
8,
DB_SIZE,
store_len + DB_SIZE, // TODO: remove DB_SIZE you removed fake data.
DB_BUFFER,
) {
Ok((actor, handle)) => {
Expand Down

0 comments on commit 88bc68f

Please sign in to comment.