Skip to content

Commit

Permalink
Merge branch 'Xilinx:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ManojTakasi authored Nov 7, 2023
2 parents 3b0834c + f452a60 commit 52ccaac
Show file tree
Hide file tree
Showing 81 changed files with 369 additions and 306 deletions.
2 changes: 1 addition & 1 deletion build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CMAKE_MAJOR_VERSION=`cmake --version | head -n 1 | awk '{print $3}' |awk -F. '{p
CPU=`uname -m`

if [[ $CMAKE_MAJOR_VERSION != 3 ]]; then
if [[ $OSDIST == "centos" ]] || [[ $OSDIST == "amzn" ]] || [[ $OSDIST == "rhel" ]] || [[ $OSDIST == "fedora" ]]; then
if [[ $OSDIST == "centos" ]] || [[ $OSDIST == "amzn" ]] || [[ $OSDIST == "rhel" ]] || [[ $OSDIST == "fedora" ]] || [[ $OSDIST == "mariner" ]]; then
CMAKE=cmake3
if [[ ! -x "$(command -v $CMAKE)" ]]; then
echo "$CMAKE is not installed, please run xrtdeps.sh"
Expand Down
6 changes: 4 additions & 2 deletions src/CMake/cpackLin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ if (${LINUX_FLAVOR} MATCHES "^(ubuntu|debian)")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS ${CPACK_DEBIAN_XRT_PACKAGE_DEPENDS})
endif()

elseif (${LINUX_FLAVOR} MATCHES "^(rhel|centos|amzn|fedora|sles)")
elseif (${LINUX_FLAVOR} MATCHES "^(rhel|centos|amzn|fedora|sles|mariner)")
execute_process(
COMMAND uname -m
OUTPUT_VARIABLE CPACK_ARCH
Expand All @@ -129,10 +129,12 @@ elseif (${LINUX_FLAVOR} MATCHES "^(rhel|centos|amzn|fedora|sles)")
SET(CPACK_RPM_AZURE_PRE_UNINSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/azure/prerm")
SET(CPACK_RPM_CONTAINER_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/container/postinst")
SET(CPACK_RPM_CONTAINER_PRE_UNINSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/container/prerm")
SET(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/local" "/usr/src" "/opt" "/etc/OpenCL" "/etc/OpenCL/vendors" "/usr/lib" "/usr/lib/pkgconfig" "/usr/lib64/pkgconfig" "/lib" "/lib/firmware")
SET(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/local" "/usr/src" "/opt" "/etc/OpenCL" "/etc/OpenCL/vendors" "/usr/lib" "/usr/lib/pkgconfig" "/usr/lib64/pkgconfig" "/lib" "/lib/firmware" "/usr/share/pkgconfig")
SET(CPACK_RPM_AWS_PACKAGE_REQUIRES "xrt >= ${XRT_VERSION_MAJOR}.${XRT_VERSION_MINOR}.${XRT_VERSION_PATCH}")
if (${LINUX_FLAVOR} MATCHES "^(sles)")
SET(CPACK_RPM_XRT_PACKAGE_REQUIRES "ocl-icd-devel >= 2.2, dkms >= 2.2.0, python3 >= 3.6")
elseif (${LINUX_FLAVOR} MATCHES "^(mariner)")
SET(CPACK_RPM_XRT_PACKAGE_REQUIRES "ocl-icd >= 2.2, dkms >= 2.5.0, python3 >= 3.6")
else()
SET(CPACK_RPM_XRT_PACKAGE_REQUIRES "ocl-icd >= 2.2, dkms >= 2.5.0, python3 >= 3.6")
endif()
Expand Down
2 changes: 0 additions & 2 deletions src/runtime_src/core/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ set_target_properties(xrt_coreutil PROPERTIES
# Private dependencies for fully resolved dynamic xrt_coreutil
target_link_libraries(xrt_coreutil
PRIVATE
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
)

Expand All @@ -80,7 +79,6 @@ target_link_libraries(xrt_coreutil
# libraries of boost
target_link_libraries(xrt_coreutil_static
INTERFACE
boost_filesystem
boost_system
)

Expand Down
2 changes: 0 additions & 2 deletions src/runtime_src/core/common/api/xrt_xclbin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
#include "xclbin_int.h"

#include <boost/algorithm/string.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>

#include <array>
#include <filesystem>
Expand Down
27 changes: 13 additions & 14 deletions src/runtime_src/core/common/config_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@
#include "message.h"
#include "error.h"

#include <set>
#include <filesystem>
#include <cstdlib>
#include <iostream>
#include <set>
#include <mutex>
#include <cstdlib>

#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/ini_parser.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/format.hpp>

#ifdef __linux__
Expand Down Expand Up @@ -99,14 +98,14 @@ get_self_path()
* Look for xrt.ini and if not found look for legacy sdaccel.ini.
*/
static std::string
verify_ini_path(const boost::filesystem::path& dir)
verify_ini_path(const std::filesystem::path& dir)
{
auto file_path = dir / "xrt.ini";
if (boost::filesystem::exists(file_path))
if (std::filesystem::exists(file_path))
return file_path.string();

file_path = dir / "sdaccel.ini";
if (boost::filesystem::exists(file_path))
if (std::filesystem::exists(file_path))
return file_path.string();

return "";
Expand All @@ -118,27 +117,27 @@ get_ini_path()
std::string full_path;
try {
//The env variable should be the full path which includes xrt.ini
auto xrt_path = boost::filesystem::path(value_or_empty(std::getenv("XRT_INI_PATH")));
if (boost::filesystem::exists(xrt_path))
auto xrt_path = std::filesystem::path(value_or_empty(std::getenv("XRT_INI_PATH")));
if (std::filesystem::exists(xrt_path))
return xrt_path.string();

//The env variable should be the full path which includes sdaccel.ini
auto sda_path = boost::filesystem::path(value_or_empty(std::getenv("SDACCEL_INI_PATH")));
if (boost::filesystem::exists(sda_path))
auto sda_path = std::filesystem::path(value_or_empty(std::getenv("SDACCEL_INI_PATH")));
if (std::filesystem::exists(sda_path))
return sda_path.string();

auto exe_path = boost::filesystem::path(get_self_path()).parent_path();
auto exe_path = std::filesystem::path(get_self_path()).parent_path();
full_path = verify_ini_path(exe_path);
if (!full_path.empty())
return full_path;

auto self_path = boost::filesystem::current_path();
auto self_path = std::filesystem::current_path();
full_path = verify_ini_path(self_path);
if (!full_path.empty())
return full_path;

}
catch (const boost::filesystem::filesystem_error&) {
catch (const std::filesystem::filesystem_error&) {
}
return full_path;
}
Expand Down
2 changes: 0 additions & 2 deletions src/runtime_src/core/edge/common_em/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ PROTOBUF_GENERATE_CPP(ProtoSources ProtoHeaders ${PROTO_SRC_FILES})

include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${BOOST_FILESYSTEM_INCLUDE_DIRS}
${BOOST_SYSTEM_INCLUDE_DIRS}
)

Expand Down Expand Up @@ -49,7 +48,6 @@ set_target_properties(common_em PROPERTIES VERSION ${XRT_VERSION_STRING}

target_link_libraries(common_em
PRIVATE
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${PROTOBUF_LIBRARY}
xrt_coreutil
Expand Down
12 changes: 6 additions & 6 deletions src/runtime_src/core/edge/common_em/system_utils.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ namespace systemUtil {
case CREATE :
{
operationStr = "CREATE";
if (boost::filesystem::exists(operand1) == false)
if (std::filesystem::exists(operand1) == false)
{
boost::filesystem::create_directories(operand1);
std::filesystem::create_directories(operand1);
}
break;
}
case REMOVE :
{
operationStr = "REMOVE";
if (boost::filesystem::exists(operand1) )
if (std::filesystem::exists(operand1) )
{
boost::filesystem::remove_all(operand1);
std::filesystem::remove_all(operand1);
}
break;
}
Expand All @@ -49,7 +49,7 @@ namespace systemUtil {
operationStr = "COPY";
std::stringstream copyCommand;
copyCommand <<"cp "<<operand1<<" "<<operand2;
if (boost::filesystem::exists(operand1) )
if (std::filesystem::exists(operand1) )
{
int status = system(copyCommand.str().c_str());
printErrorMessage(copyCommand.str(),status, LineNo);
Expand All @@ -61,7 +61,7 @@ namespace systemUtil {
operationStr = "APPEND";
std::stringstream appendCommand;
appendCommand <<"cat "<<operand1<<">> "<<operand2;
if (boost::filesystem::exists(operand1) )
if (std::filesystem::exists(operand1) )
{
int status = system(appendCommand.str().c_str());
printErrorMessage(appendCommand.str(),status, LineNo);
Expand Down
4 changes: 1 addition & 3 deletions src/runtime_src/core/edge/common_em/system_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#ifndef __SYSTEM_UTILS_H__
#define __SYSTEM_UTILS_H__
#include <filesystem>
#include <iostream>
#include <sstream>
#include <stdio.h>
Expand All @@ -13,9 +14,6 @@
#include <sys/stat.h>
#include <unistd.h>

#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>

namespace systemUtil {

enum systemOperation
Expand Down
3 changes: 0 additions & 3 deletions src/runtime_src/core/edge/hw_emu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ include_directories(
${EM_SRC_DIR}
${DRM_INCLUDE_DIRS}
${COMMON_EM_SRC_DIR}
${BOOST_FILESYSTEM_INCLUDE_DIRS}
${BOOST_SYSTEM_INCLUDE_DIRS}
${CMAKE_BINARY_DIR} # includes version.h
)
Expand Down Expand Up @@ -84,7 +83,6 @@ if (DEFINED XRT_AIE_BUILD)
rt
dl
uuid
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
xaiengine
)
Expand All @@ -96,7 +94,6 @@ else()
rt
dl
uuid
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
)
endif()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ set_target_properties(instance_query PROPERTIES

target_link_libraries(instance_query
PRIVATE
${Boost_FILESYSTEM_LIBRARY}
)

install (TARGETS instance_query
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "xrt/xrt_kernel.h"

#include <cstring>
#include <filesystem>
#include <fstream>
#include <map>
#include <set>
Expand All @@ -14,7 +15,6 @@
#include <vector>

#include <boost/algorithm/string.hpp>
#include <boost/filesystem.hpp>
#include <boost/format.hpp>
#include <boost/property_tree/ini_parser.hpp>
#include <boost/property_tree/json_parser.hpp>
Expand Down Expand Up @@ -242,14 +242,14 @@ get_ps_kernel_data( char *output,
openlog("new_kernel_source", LOG_PID | LOG_CONS | LOG_NDELAY, LOG_NEWS);
log_info("Stared new kernel\n", enable_debug);

boost::filesystem::path p("/sys/devices/platform/ert_hw/");
boost::filesystem::directory_iterator dir(p);
std::filesystem::path p("/sys/devices/platform/ert_hw/");
std::filesystem::directory_iterator dir(p);
pt::ptree all_data;
add_schema(all_data);
get_os_release(all_data);

pt::ptree all_ps_data;
while (dir != boost::filesystem::directory_iterator()) {
while (dir != std::filesystem::directory_iterator()) {
// Get a copy of the current directories name.
// Getting a reference cause a undesired change when the
// the directory updates
Expand Down
2 changes: 0 additions & 2 deletions src/runtime_src/core/edge/skd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ pkg_check_modules(LIBFFI REQUIRED libffi)
find_package(libffi REQUIRED)

include_directories(
${BOOST_FILESYSTEM_INCLUDE_DIRS}
${BOOST_SYSTEM_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../include
Expand All @@ -32,7 +31,6 @@ add_dependencies(skd

target_link_libraries(skd
PRIVATE
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
xrt_core
xrt_coreutil
Expand Down
8 changes: 4 additions & 4 deletions src/runtime_src/core/edge/skd/xrt_skd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,13 +359,13 @@ namespace xrt {
return -EINVAL;
}

const boost::filesystem::path path(SOFT_KERNEL_FILE_PATH);
const std::filesystem::path path(SOFT_KERNEL_FILE_PATH);
xrt_core::message::send(severity_level::debug, "SKD", path.string());

boost::filesystem::create_directories(path);
std::filesystem::create_directories(path);

// Check if file already exists and is the same size
if(boost::filesystem::exists(m_sk_path) && (boost::filesystem::file_size(m_sk_path) == prop.size)) {
if(std::filesystem::exists(m_sk_path) && (std::filesystem::file_size(m_sk_path) == prop.size)) {
return 0;
}

Expand Down Expand Up @@ -408,7 +408,7 @@ namespace xrt {
*/
int skd::delete_softkernelfile() const
{
return boost::filesystem::remove(m_sk_path);
return std::filesystem::remove(m_sk_path);
}

// Convert argument to ffi_type
Expand Down
4 changes: 2 additions & 2 deletions src/runtime_src/core/edge/skd/xrt_skd.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
#ifndef _XRT_SKD_H_
#define _XRT_SKD_H_

#include <boost/filesystem.hpp>
#include <boost/format.hpp>
#include <chrono>
#include <cstdarg>
#include <cstdint>
#include <dlfcn.h>
#include <execinfo.h>
#include <filesystem>
#include <fstream>
#include <functional>
#include <iostream>
Expand Down Expand Up @@ -115,7 +115,7 @@ class skd
xrtDeviceHandle m_xrtdhdl = 0;
uuid m_xclbin_uuid;
// Path of PS kernel object file constructed from PS kernel path and PS kernel name
const boost::filesystem::path m_sk_path;
const std::filesystem::path m_sk_path;
// PS Kernel instance name
std::string m_sk_name = "";
// PS Kernel CU Index assigned from host
Expand Down
2 changes: 0 additions & 2 deletions src/runtime_src/core/edge/sw_emu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ include_directories(
${COMMON_SRC_DIR}
${COMMON_EM_SRC_DIR}
${COMMON_EM_GEN_DIR}
${BOOST_FILESYSTEM_INCLUDE_DIRS}
${BOOST_SYSTEM_INCLUDE_DIRS}
)

Expand Down Expand Up @@ -49,7 +48,6 @@ set_target_properties(xrt_swemu PROPERTIES VERSION ${XRT_VERSION_STRING}

target_link_libraries(xrt_swemu
PRIVATE
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${PROTOBUF_LIBRARY}
xrt_coreutil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ namespace xclswemuhal2 {

std::string modelDirectory("");

if (boost::filesystem::exists(xilinxInstall + "/data/emulation/unified/sw_emu/generic_pcie/model/genericpciemodel"))
if (std::filesystem::exists(xilinxInstall + "/data/emulation/unified/sw_emu/generic_pcie/model/genericpciemodel"))
modelDirectory = xilinxInstall + "/data/emulation/unified/sw_emu/generic_pcie/model/genericpciemodel";
else
modelDirectory = xilinxInstall + "/data/emulation/unified/cpu_em/generic_pcie/model/genericpciemodel";
Expand Down
2 changes: 0 additions & 2 deletions src/runtime_src/core/edge/user/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ if (DEFINED XRT_AIE_BUILD)
rt
dl
uuid
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
xaiengine
)
Expand All @@ -85,7 +84,6 @@ else()
rt
dl
uuid
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
)

Expand Down
3 changes: 2 additions & 1 deletion src/runtime_src/core/edge/user/aie_sys_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

#include "aie_sys_parser.h"
#include <boost/format.hpp>
#include <boost/filesystem.hpp>
#include <boost/property_tree/json_parser.hpp>

#include <filesystem>

std::fstream aie_sys_parser::sysfs_open_path(const std::string& path,
bool write, bool binary)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "core/include/xdp/hal_api.h"

namespace bfs = boost::filesystem;
namespace sfs = std::filesystem;

namespace xdphalinterface {

Expand Down
Loading

0 comments on commit 52ccaac

Please sign in to comment.