Skip to content

Commit

Permalink
CR-1221398 Remove unknown xocl and xclmgmt from xrt-smi examine (#8666)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Chane <[email protected]>
  • Loading branch information
rchane authored Dec 18, 2024
1 parent 63f6255 commit 1b54c8a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 12 additions & 6 deletions src/runtime_src/core/pcie/linux/system_linux.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright (C) 2019-2022 Xilinx, Inc
// Copyright (C) 2022 Advanced Micro Devices, Inc. All rights reserved.
// Copyright (C) 2022-2024 Advanced Micro Devices, Inc. All rights reserved.

// Local - Include files
#include "device_linux.h"
Expand All @@ -12,6 +12,7 @@
#include "core/common/query_requests.h"

// 3rd Party Library - Include files
#include <boost/algorithm/string/predicate.hpp>
#include <boost/format.hpp>
#include <boost/property_tree/ini_parser.hpp>
#include <gnu/libc-version.h>
Expand Down Expand Up @@ -82,9 +83,11 @@ driver_version(const std::string& driver)
getline(ss, hash, ',');
}

_pt.put("name", driver);
_pt.put("version", ver);
_pt.put("hash", hash);
if (!((boost::iequals(driver, "xclmgmt") || boost::iequals(driver, "xocl")) && (boost::iequals(ver, "unknown")))) {
_pt.put("name", driver);
_pt.put("version", ver);
_pt.put("hash", hash);
}
return _pt;
}

Expand Down Expand Up @@ -165,8 +168,11 @@ get_driver_info(boost::property_tree::ptree &pt)
{
boost::property_tree::ptree _ptDriverInfo;

for (const auto& drv : driver_list::get())
_ptDriverInfo.push_back( {"", driver_version(drv->name())} );
for (const auto& drv : driver_list::get()) {
boost::property_tree::ptree _drv = driver_version(drv->name());
if (!_drv.empty())
_ptDriverInfo.push_back( {"", _drv} );
}
pt.put_child("drivers", _ptDriverInfo);
}

Expand Down
2 changes: 0 additions & 2 deletions src/runtime_src/core/tools/common/XBUtilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -759,8 +759,6 @@ fill_xrt_versions(const boost::property_tree::ptree& pt_xrt,
std::string drv_version = boost::iequals(drv_name, "N/A") ? drv_name : drv_name.append(" Version");
output << boost::format(" %-20s : %s\n") % drv_version % driver.get<std::string>("version", "N/A");
}
if (boost::iequals(drv_name, "xclmgmt") && boost::iequals(driver.get<std::string>("version", "N/A"), "unknown"))
output << "WARNING: xclmgmt version is unknown. Is xclmgmt driver loaded? Or is MSD/MPD running?" << std::endl;
}

try {
Expand Down

0 comments on commit 1b54c8a

Please sign in to comment.