Skip to content
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

Undo revert of the PR #1014 #1017

Closed
wants to merge 1 commit into from
Closed
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
20 changes: 20 additions & 0 deletions libkineto/src/output_json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ static constexpr const char* kOutSplit = "Out split size";
static constexpr const char* kProcessGroupName = "Process Group Name";
static constexpr const char* kProcessGroupDesc = "Process Group Description";
static constexpr const char* kGroupRanks = "Process Group Ranks";
static constexpr const char* kInTensorsStart = "Input Tensors start";
static constexpr const char* kOutTensorsStart = "Output Tensors start";
static constexpr const char* kRank = "Rank";
static constexpr const char* kP2pSrc = "Src Rank";
static constexpr const char* kP2pDst = "Dst Rank";
Expand Down Expand Up @@ -419,6 +421,24 @@ void ChromeTraceLogger::handleActivity(const libkineto::ITraceActivity& op) {
kDtype,
dtype));
}
const auto& input_tensor_starts =
collectiveRecord->getMetadataValue(kInTensorsStart);
const auto output_tensor_starts =
collectiveRecord->getMetadataValue(kOutTensorsStart);
if (!input_tensor_starts.empty()) {
if (!arg_values.empty()) {
arg_values.append(",");
}
arg_values.append(
fmt::format(" \"{}\": {}", kInTensorsStart, input_tensor_starts));
}
if (!output_tensor_starts.empty()) {
if (!arg_values.empty()) {
arg_values.append(",");
}
arg_values.append(
fmt::format(" \"{}\": {}", kOutTensorsStart, output_tensor_starts));
}
// In/out split size are valid for all_to_all
const auto& inSplitSize = collectiveRecord->getMetadataValue(kInSplit);
const auto& outSplitSize = collectiveRecord->getMetadataValue(kOutSplit);
Expand Down
Loading