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

Add CLI option for profile export file #369

Merged
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
9 changes: 9 additions & 0 deletions src/c++/perf_analyzer/command_line_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,7 @@ CLParser::ParseCommandLine(int argc, char** argv)
{"input-tensor-format", required_argument, 0, 55},
{"output-tensor-format", required_argument, 0, 56},
{"version", no_argument, 0, 57},
{"profile-export-file", required_argument, 0, 58},
{0, 0, 0, 0}};

// Parse commandline...
Expand Down Expand Up @@ -1296,6 +1297,14 @@ CLParser::ParseCommandLine(int argc, char** argv)
PrintVersion();
break;
}
case 58: {
std::string profile_export_file{optarg};
if (IsFile(profile_export_file) || IsDirectory(profile_export_file)) {
Usage("--profile-export-file must not already exist");
}
params_->profile_export_file = profile_export_file;
break;
}
case 'v':
params_->extra_verbose = params_->verbose;
params_->verbose = true;
Expand Down
3 changes: 3 additions & 0 deletions src/c++/perf_analyzer/command_line_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ struct PerfAnalyzerParameters {

// Triton inference response output tensor format.
cb::TensorFormat output_tensor_format{cb::TensorFormat::BINARY};

// The profile export file path.
std::string profile_export_file{""};
debermudez marked this conversation as resolved.
Show resolved Hide resolved
};

using PAParamsPtr = std::shared_ptr<PerfAnalyzerParameters>;
Expand Down
Loading