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

CR-1206429 xrt-smi output and help menu fixes #8297

Merged
merged 1 commit into from
Jul 18, 2024
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
1 change: 1 addition & 0 deletions src/runtime_src/core/tools/common/XBMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ void main_(int argc, char** argv,
XBU::report_commands_help( _executable, _description, globalOptions, hiddenOptions, parsedSubCmds);
if (!bHelp && !sCmd.empty())
throw xrt_core::error(std::errc::operation_canceled);
return;
}

// -- Prepare the data
Expand Down
6 changes: 3 additions & 3 deletions src/runtime_src/core/tools/common/reports/ReportHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ ReportHost::writeReport(const xrt_core::device* /*_pDevice*/,
% lib.get<std::string>("version", "N/A");
}
_output << boost::format(" %-20s : %s\n") % "Model" % _pt.get<std::string>("host.os.model");
_output << boost::format(" %-20s : %s\n") % "BIOS vendor" % _pt.get<std::string>("host.os.bios_vendor");
_output << boost::format(" %-20s : %s\n") % "BIOS version" % _pt.get<std::string>("host.os.bios_version");
_output << boost::format(" %-20s : %s\n") % "BIOS Vendor" % _pt.get<std::string>("host.os.bios_vendor");
_output << boost::format(" %-20s : %s\n") % "BIOS Version" % _pt.get<std::string>("host.os.bios_version");
_output << std::endl;
_output << "XRT\n";
_output << boost::format(" %-20s : %s\n") % "Version" % _pt.get<std::string>("host.xrt.version", "N/A");
Expand Down Expand Up @@ -169,7 +169,7 @@ ReportHost::writeReport(const xrt_core::device* /*_pDevice*/,
//no device available
}

_output << std::endl << "Devices present\n";
_output << std::endl << "Device(s) Present\n";
if (available_devices.empty())
_output << " 0 devices found" << std::endl;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ReportRyzenPlatform::writeReport(const xrt_core::device* /*_pDevice*/,
_output << boost::format(" %-23s: %s \n") % "Name" % pt_static_region.get<std::string>("name");

const boost::property_tree::ptree& pt_status = pt_platform.get_child("status");
_output << boost::format(" %-23s: %s \n") % "Performance Mode" % pt_status.get<std::string>("performance_mode");
_output << boost::format(" %-23s: %s \n") % "Power Mode" % pt_status.get<std::string>("performance_mode");

const boost::property_tree::ptree& clocks = pt_platform.get_child("clocks", empty_ptree);
if (!clocks.empty()) {
Expand All @@ -63,7 +63,7 @@ ReportRyzenPlatform::writeReport(const xrt_core::device* /*_pDevice*/,
}

auto watts = pt_platform.get<std::string>("electrical.power_consumption_watts", "N/A");
_output << std::endl << boost::format("%-23s: %s Watts\n") % "Power" % watts;
_output << std::endl << boost::format("%-23s : %s Watts\n") % "Power" % watts;
}

_output << std::endl;
Expand Down
6 changes: 3 additions & 3 deletions src/runtime_src/core/tools/xbutil2/SubCmdValidate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ get_platform_info(const std::shared_ptr<xrt_core::device>& device,
oStream << boost::format(" %-22s: %s\n") % "Platform ID" % plat_id;
const std::string& perf_mode = ptTree.get("performance_mode", "");
if (!perf_mode.empty())
oStream << boost::format(" %-22s: %s\n") % "Performance Mode" % perf_mode;
oStream << boost::format(" %-22s: %s\n") % "Power Mode" % perf_mode;
const std::string& power = ptTree.get("power", "");
if (!boost::starts_with(power, ""))
oStream << boost::format(" %-22s: %s Watts\n") % "Power" % power;
Expand Down Expand Up @@ -449,7 +449,7 @@ SubCmdValidate::SubCmdValidate(bool _isHidden, bool _isDepricated, bool _isPreli

m_commonOptions.add(common_options);
m_commonOptions.add_options()
("run,r", boost::program_options::value<decltype(m_tests_to_run)>(&m_tests_to_run)->multitoken(), (std::string("Run a subset of the test suite. Valid options are:\n") + formatRunValues).c_str() )
("run,r", boost::program_options::value<decltype(m_tests_to_run)>(&m_tests_to_run)->multitoken(), (std::string("Run a subset of the test suite. Valid options are:\n") + formatRunValues).c_str() )
;
}

Expand Down Expand Up @@ -512,7 +512,7 @@ SubCmdValidate::print_help_internal() const
static const std::string testOptionValues = XBU::create_suboption_list_map(deviceClass, jsonOptions, help_tests);
std::vector<std::string> tempVec;
common_options.add_options()
("report,r", boost::program_options::value<decltype(tempVec)>(&tempVec)->multitoken(), (std::string("The type of report to be produced. Reports currently available are:\n") + testOptionValues).c_str() )
("run,r", boost::program_options::value<decltype(tempVec)>(&tempVec)->multitoken(), (std::string("Run a subset of the test suite. Valid options are:\n") + testOptionValues).c_str() )
;
printHelp(common_options, m_hiddenOptions, deviceClass, false, extendedKeysOptions());
}
Expand Down
Loading