Skip to content

Commit

Permalink
more logging (#637)
Browse files Browse the repository at this point in the history
  • Loading branch information
philsippl authored Nov 1, 2024
1 parent 1a7666d commit 0921a1a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deploy/prod/common-values-iris-mpc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: "ghcr.io/worldcoin/iris-mpc:v0.8.38"
image: "ghcr.io/worldcoin/iris-mpc:v0.8.39"

environment: prod
replicaCount: 1
Expand Down
9 changes: 9 additions & 0 deletions iris-mpc-gpu/src/server/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1241,26 +1241,35 @@ impl ServerActor {
}

fn sync_batch_entries(&mut self, valid_entries: &[bool]) -> eyre::Result<Vec<bool>> {
tracing::info!(party_id = self.party_id, "sync_batch_entries start");
let mut buffer = self
.device_manager
.device(0)
.alloc_zeros(valid_entries.len() * self.comms[0].world_size())
.unwrap();

tracing::info!(party_id = self.party_id, "htod_copy start");

let buffer_self = self
.device_manager
.device(0)
.htod_copy(valid_entries.iter().map(|&x| x as u8).collect::<Vec<_>>())?;

tracing::info!(party_id = self.party_id, "all_gather start");

self.comms[0]
.all_gather(&buffer_self, &mut buffer)
.map_err(|e| eyre!(format!("{:?}", e)))?;

tracing::info!(party_id = self.party_id, "dtoh_sync_copy start");

let results = self.device_manager.device(0).dtoh_sync_copy(&buffer)?;
let results: Vec<_> = results
.chunks_exact(results.len() / self.comms[0].world_size())
.collect();

tracing::info!(party_id = self.party_id, "sync_batch_entries end");

let mut valid_merged = vec![];
for i in 0..results[0].len() {
valid_merged.push(
Expand Down

0 comments on commit 0921a1a

Please sign in to comment.