Skip to content

Commit

Permalink
Multithreaded Encryption (#1491)
Browse files Browse the repository at this point in the history
Makes encryption multithreaded. Possibly makes encryption multi-core (to be seen)
  • Loading branch information
tyurek authored Dec 12, 2024
1 parent cdb618d commit 4f112ad
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ipa-core/src/query/runner/hybrid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ use crate::{
replicated::semi_honest::AdditiveShare as Replicated, BitDecomposed, TransposeFrom,
Vectorizable,
},
seq_join::seq_join,
sharding::{ShardConfiguration, Sharded},
};

Expand Down Expand Up @@ -130,10 +131,12 @@ where
}))
})
.try_flatten()
.take(sz);
.take(sz)
.map(|v| async move { v });

let (decrypted_reports, resharded_tags) = reshard_aad(
ctx.narrow(&HybridStep::ReshardByTag),
stream,
seq_join(ctx.active_work(), stream),
|ctx, _, tag| tag.shard_picker(ctx.shard_count()),
)
.await?;
Expand Down Expand Up @@ -344,7 +347,7 @@ mod tests {
}

// cannot test for Err directly because join3v calls unwrap. This should be sufficient.
#[tokio::test]
#[tokio::test(flavor = "multi_thread", worker_threads = 3)]
#[should_panic(expected = "DuplicateBytes")]
async fn duplicate_encrypted_hybrid_reports() {
const SHARDS: usize = 2;
Expand Down

0 comments on commit 4f112ad

Please sign in to comment.