Skip to content

Commit

Permalink
Remove multiple printout of early access message (#7774)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Benusovich <[email protected]>
  • Loading branch information
dbenusov authored Oct 27, 2023
1 parent 1309893 commit 6e920d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/runtime_src/core/tools/common/XBUtilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ XBUtilities::collect_devices( const std::set<std::string> &_deviceBDFs,
}

std::shared_ptr<xrt_core::device>
XBUtilities::get_device( const std::string &deviceBDF, bool in_user_domain)
XBUtilities::get_device( const std::string &deviceBDF, bool in_user_domain, bool print_warning)
{
// -- If the deviceBDF is empty then do nothing
if (deviceBDF.empty())
Expand All @@ -405,7 +405,7 @@ XBUtilities::collect_devices( const std::set<std::string> &_deviceBDFs,
check_versal_boot(device);

const std::string device_name = xrt_core::device_query_default<xrt_core::query::rom_vbnv>(device, "");
if (device_name.find("Ryzen") != std::string::npos) {
if (device_name.find("Ryzen") != std::string::npos && print_warning) {
std::cout << "------------------------------------------------------------\n";
std::cout << " EARLY ACCESS \n";
std::cout << " This release of xbutil contains early access \n";
Expand Down Expand Up @@ -436,7 +436,7 @@ XBUtilities::get_device_class(const std::string &deviceBDF, bool in_user_domain)
if (deviceBDF.empty())
return tempDeviceMapping("");

std::shared_ptr<xrt_core::device> device = get_device(boost::algorithm::to_lower_copy(deviceBDF), in_user_domain);
std::shared_ptr<xrt_core::device> device = get_device(boost::algorithm::to_lower_copy(deviceBDF), in_user_domain, false);
return tempDeviceMapping(xrt_core::device_query_default<xrt_core::query::rom_vbnv>(device, ""));
}

Expand Down
2 changes: 1 addition & 1 deletion src/runtime_src/core/tools/common/XBUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace XBUtilities {
bool _inUserDomain,
xrt_core::device_collection &_deviceCollection);

std::shared_ptr<xrt_core::device> get_device (const std::string& deviceBDF, bool in_user_domain);
std::shared_ptr<xrt_core::device> get_device (const std::string& deviceBDF, bool in_user_domain, bool print_warning = true);

std::string get_device_class(const std::string& deviceBDF, bool in_user_domain);

Expand Down

0 comments on commit 6e920d6

Please sign in to comment.