Skip to content

Commit

Permalink
faster network test
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger Waleffe authored and Roger Waleffe committed Nov 22, 2023
1 parent 91ec1c8 commit fbe6151
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cpp/src/data/batch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ void Batch::remoteTo(shared_ptr<c10d::ProcessGroupGloo> pg, int worker_id, int t
}

void Batch::remoteReceive(shared_ptr<c10d::ProcessGroupGloo> pg, int worker_id, int tag, bool receive_meta) {
Timer t_full = new Timer(false);
t_full.start();
// Timer t_full = new Timer(false);
// t_full.start();

if (receive_meta) {
torch::Tensor metadata = torch::tensor({-1, -1, -1}, {torch::kInt32});
Expand Down Expand Up @@ -217,8 +217,8 @@ void Batch::remoteReceive(shared_ptr<c10d::ProcessGroupGloo> pg, int worker_id,
// t.stop();
// std::cout<<"batch recv: "<<t.getDuration()<<"\n";

t_full.stop();
std::cout<<"batch recv full: "<<t_full.getDuration()<<"\n";
// t_full.stop();
// std::cout<<"batch recv full: "<<t_full.getDuration()<<"\n";
}

void Batch::accumulateGradients(float learning_rate) {
Expand Down

0 comments on commit fbe6151

Please sign in to comment.