Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/mpi/all_gather.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void RunAllGatherExample(int argc, char **argv, int warmup_iter,
CHECK_RT(Rt, Rt::Memcpy(h_recv.data(), d_recv, recv_bytes,
Rt::MemcpyDeviceToHost));

double elapsed = timer.elapsed_ms() / static_cast<double>(profile_iter);
double elapsed = timer.ElapsedMs() / static_cast<double>(profile_iter);

// Result Validation
bool correct = true;
Expand Down
2 changes: 1 addition & 1 deletion examples/mpi/all_reduce.cc
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void RunAllReduceExample(int argc, char **argv, int warmup_iter,
}

CHECK_RT(Rt, Rt::StreamSynchronize(nullptr));
double elapsed = timer.elapsed_ms() / static_cast<double>(profile_iter);
double elapsed = timer.ElapsedMs() / static_cast<double>(profile_iter);

// Result Validation
float expected = 0.0f;
Expand Down
2 changes: 1 addition & 1 deletion examples/mpi/all_to_all.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void RunAllToAllExample(int argc, char **argv, int warmup_iter,
CHECK_RT(Rt, Rt::StreamSynchronize(nullptr));
CHECK_RT(Rt, Rt::Memcpy(h_recv.data(), d_recv, total_bytes,
Rt::MemcpyDeviceToHost));
double elapsed = timer.elapsed_ms() / static_cast<double>(profile_iter);
double elapsed = timer.ElapsedMs() / static_cast<double>(profile_iter);

// Result Validation
// recv `block[src]` on rank r should come from `src`'s send `block[dst=r]`.
Expand Down
2 changes: 1 addition & 1 deletion examples/mpi/broadcast.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void RunBroadcastExample(int argc, char **argv, int warmup_iter,
CHECK_INFINI(collective_call());
}
CHECK_RT(Rt, Rt::StreamSynchronize(nullptr));
double elapsed = timer.elapsed_ms() / static_cast<double>(profile_iter);
double elapsed = timer.ElapsedMs() / static_cast<double>(profile_iter);

// Validation
Validator::ValidateResult(h_recv.data(), kNumElements, kRootMagicValue,
Expand Down
2 changes: 1 addition & 1 deletion examples/mpi/gather.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void RunGatherExample(int argc, char **argv, int warmup_iter, int profile_iter,
}

CHECK_RT(Rt, Rt::StreamSynchronize(nullptr));
double elapsed = timer.elapsed_ms() / static_cast<double>(profile_iter);
double elapsed = timer.ElapsedMs() / static_cast<double>(profile_iter);

// Result Validation (only meaningful on `root`).
if (rank == kRoot) {
Expand Down
2 changes: 1 addition & 1 deletion examples/mpi/reduce.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void RunReduceExample(int argc, char **argv, int warmup_iter, int profile_iter,
}

CHECK_RT(Rt, Rt::StreamSynchronize(nullptr));
double elapsed = timer.elapsed_ms() / static_cast<double>(profile_iter);
double elapsed = timer.ElapsedMs() / static_cast<double>(profile_iter);

// Result Validation (only meaningful on `root`).
if (rank == kRoot) {
Expand Down
2 changes: 1 addition & 1 deletion examples/mpi/reduce_scatter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void RunReduceScatterExample(int argc, char **argv, int warmup_iter,
CHECK_RT(Rt, Rt::Memcpy(h_recv.data(), d_recv, recv_bytes,
Rt::MemcpyDeviceToHost));

double elapsed = timer.elapsed_ms() / static_cast<double>(profile_iter);
double elapsed = timer.ElapsedMs() / static_cast<double>(profile_iter);

// Result Validation:
float expected = 0.0f;
Expand Down
2 changes: 1 addition & 1 deletion examples/mpi/scatter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void RunScatterExample(int argc, char **argv, int warmup_iter, int profile_iter,
}

CHECK_RT(Rt, Rt::StreamSynchronize(nullptr));
double elapsed = timer.elapsed_ms() / static_cast<double>(profile_iter);
double elapsed = timer.ElapsedMs() / static_cast<double>(profile_iter);

// Result Validation: every rank should receive its own `(rank + 1)` block.
CHECK_RT(Rt, Rt::Memcpy(h_recv.data(), d_recv, recv_bytes,
Expand Down
2 changes: 1 addition & 1 deletion examples/mpi/send_recv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void RunSendRecvExample(int argc, char **argv, int warmup_iter,
Rt::MemcpyDeviceToHost));
}

double elapsed = timer.elapsed_ms() / static_cast<double>(profile_iter);
double elapsed = timer.ElapsedMs() / static_cast<double>(profile_iter);

if (rank == kReceiver) {
bool correct = Validator::ValidateResult(
Expand Down
2 changes: 1 addition & 1 deletion examples/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Timer {

public:
Timer() : start(std::chrono::high_resolution_clock::now()) {}
double elapsed_ms() const {
double ElapsedMs() const {
auto end = std::chrono::high_resolution_clock::now();
return std::chrono::duration<double, std::milli>(end - start).count();
}
Expand Down
Loading