-
Notifications
You must be signed in to change notification settings - Fork 24
Latency Testing #252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: candidate
Are you sure you want to change the base?
Latency Testing #252
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -518,12 +518,16 @@ namespace TransferBench::Utils | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| size_t numTimedIterations = results.numTimedIterations; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for (auto const& exeInfoPair : results.exeResults) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ExeResult const& exeResult = exeInfoPair.second; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| numRows += 1 + exeResult.transferIdx.size(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| int displayCount = 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for (int idx : exeResult.transferIdx) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (transfers[idx].laps >= 0) displayCount++; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| numRows += 1 + displayCount; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (ev.showIterations) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| numRows += (numTimedIterations + 1); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Check that per-iteration information exists | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for (int idx : exeResult.transferIdx) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (transfers[idx].laps < 0) continue; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| TransferResult const& r = results.tfrResults[idx]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (r.perIterMsec.size() != numTimedIterations) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Print("[ERROR] Per iteration timing data unavailable: Expected %lu data points, but have %lu\n", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -569,87 +573,141 @@ namespace TransferBench::Utils | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Transfer const& t = transfers[idx]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| TransferResult const& r = results.tfrResults[idx]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| table.Set(rowIdx, 0, "Transfer %-4d ", idx); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| table.Set(rowIdx, 1, "%8.3f GB/s " , r.avgBandwidthGbPerSec); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| table.Set(rowIdx, 2, "%8.3f ms " , r.avgDurationMsec); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| table.Set(rowIdx, 3, "%12lu bytes " , r.numBytes); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| char exeSubIndexStr[32] = ""; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (t.exeSubIndex != -1) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sprintf(exeSubIndexStr, ".%d", t.exeSubIndex); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (isMultiRank) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| table.Set(rowIdx, 4, " %s -> R%d%c%d%s:%d -> %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MemDevicesToStr(t.srcs).c_str(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| exeDevice.exeRank, ExeTypeStr[t.exeDevice.exeType], t.exeDevice.exeIndex, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| exeSubIndexStr, t.numSubExecs, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MemDevicesToStr(t.dsts).c_str()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (t.laps < 0) continue; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (t.laps > 0) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Pingpong row: show latency using ping's round-trip delta | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| double latencyUs = r.avgDurationMsec * 1000.0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| table.Set(rowIdx, 0, "PingPong %-4d ", idx); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| table.Set(rowIdx, 1, "%8.3f us " , latencyUs); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| table.Set(rowIdx, 2, "%8.3f ms " , r.avgDurationMsec); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| table.Set(rowIdx, 3, "%8d laps " , t.laps); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Transfer const& pong = transfers[idx + 1]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (isMultiRank) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| table.Set(rowIdx, 4, " %s->R%d%c%d->%s <+> %s->R%d%c%d->%s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MemDevicesToStr(t.srcs).c_str(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| exeDevice.exeRank, ExeTypeStr[t.exeDevice.exeType], t.exeDevice.exeIndex, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MemDevicesToStr(t.dsts).c_str(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MemDevicesToStr(pong.srcs).c_str(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pong.exeDevice.exeRank, ExeTypeStr[pong.exeDevice.exeType], pong.exeDevice.exeIndex, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MemDevicesToStr(pong.dsts).c_str()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| table.Set(rowIdx, 4, " %s->%c%d->%s <+> %s->%c%d->%s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MemDevicesToStr(t.srcs).c_str(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ExeTypeStr[t.exeDevice.exeType], t.exeDevice.exeIndex, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MemDevicesToStr(t.dsts).c_str(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MemDevicesToStr(pong.srcs).c_str(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ExeTypeStr[pong.exeDevice.exeType], pong.exeDevice.exeIndex, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MemDevicesToStr(pong.dsts).c_str()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+586
to
+602
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Transfer const& pong = transfers[idx + 1]; | |
| if (isMultiRank) { | |
| table.Set(rowIdx, 4, " %s->R%d%c%d->%s <+> %s->R%d%c%d->%s", | |
| MemDevicesToStr(t.srcs).c_str(), | |
| exeDevice.exeRank, ExeTypeStr[t.exeDevice.exeType], t.exeDevice.exeIndex, | |
| MemDevicesToStr(t.dsts).c_str(), | |
| MemDevicesToStr(pong.srcs).c_str(), | |
| pong.exeDevice.exeRank, ExeTypeStr[pong.exeDevice.exeType], pong.exeDevice.exeIndex, | |
| MemDevicesToStr(pong.dsts).c_str()); | |
| } else { | |
| table.Set(rowIdx, 4, " %s->%c%d->%s <+> %s->%c%d->%s", | |
| MemDevicesToStr(t.srcs).c_str(), | |
| ExeTypeStr[t.exeDevice.exeType], t.exeDevice.exeIndex, | |
| MemDevicesToStr(t.dsts).c_str(), | |
| MemDevicesToStr(pong.srcs).c_str(), | |
| ExeTypeStr[pong.exeDevice.exeType], pong.exeDevice.exeIndex, | |
| MemDevicesToStr(pong.dsts).c_str()); | |
| bool const hasPong = (static_cast<size_t>(idx + 1) < transfers.size()) && (transfers[idx + 1].laps < 0); | |
| if (hasPong) { | |
| Transfer const& pong = transfers[idx + 1]; | |
| if (isMultiRank) { | |
| table.Set(rowIdx, 4, " %s->R%d%c%d->%s <+> %s->R%d%c%d->%s", | |
| MemDevicesToStr(t.srcs).c_str(), | |
| exeDevice.exeRank, ExeTypeStr[t.exeDevice.exeType], t.exeDevice.exeIndex, | |
| MemDevicesToStr(t.dsts).c_str(), | |
| MemDevicesToStr(pong.srcs).c_str(), | |
| pong.exeDevice.exeRank, ExeTypeStr[pong.exeDevice.exeType], pong.exeDevice.exeIndex, | |
| MemDevicesToStr(pong.dsts).c_str()); | |
| } else { | |
| table.Set(rowIdx, 4, " %s->%c%d->%s <+> %s->%c%d->%s", | |
| MemDevicesToStr(t.srcs).c_str(), | |
| ExeTypeStr[t.exeDevice.exeType], t.exeDevice.exeIndex, | |
| MemDevicesToStr(t.dsts).c_str(), | |
| MemDevicesToStr(pong.srcs).c_str(), | |
| ExeTypeStr[pong.exeDevice.exeType], pong.exeDevice.exeIndex, | |
| MemDevicesToStr(pong.dsts).c_str()); | |
| } | |
| } else { | |
| if (isMultiRank) { | |
| table.Set(rowIdx, 4, " %s->R%d%c%d->%s", | |
| MemDevicesToStr(t.srcs).c_str(), | |
| exeDevice.exeRank, ExeTypeStr[t.exeDevice.exeType], t.exeDevice.exeIndex, | |
| MemDevicesToStr(t.dsts).c_str()); | |
| } else { | |
| table.Set(rowIdx, 4, " %s->%c%d->%s", | |
| MemDevicesToStr(t.srcs).c_str(), | |
| ExeTypeStr[t.exeDevice.exeType], t.exeDevice.exeIndex, | |
| MemDevicesToStr(t.dsts).c_str()); | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
showIterationsis enabled,numRowsis only incremented by(numTimedIterations + 1)once per executor, but the rendering logic appends per-iteration rows for each displayed transfer. BecauseTableHelper::Setsilently ignores out-of-bounds writes, this can truncate iteration output whenever an executor has multiple transfers. UpdatenumRowsto account for(numTimedIterations + 1)per displayed transfer (regular + pingpong).