From 30de0c6d003f6a08b52c6b60b914e30ca71a1cff Mon Sep 17 00:00:00 2001 From: rbramand Date: Wed, 13 Nov 2024 11:46:35 +0530 Subject: [PATCH] Remove unused exported functions Signed-off-by: rbramand --- .../core/common/api/xrt_module.cpp | 3 - src/runtime_src/core/common/xclbin_parser.cpp | 65 ++++++++++--------- src/runtime_src/core/common/xclbin_parser.h | 9 --- 3 files changed, 33 insertions(+), 44 deletions(-) diff --git a/src/runtime_src/core/common/api/xrt_module.cpp b/src/runtime_src/core/common/api/xrt_module.cpp index a718462c5a..5372e8440d 100644 --- a/src/runtime_src/core/common/api/xrt_module.cpp +++ b/src/runtime_src/core/common/api/xrt_module.cpp @@ -824,9 +824,6 @@ class module_elf_aie2p : public module_elf // fill kernel properties m_kernel_info.props.name = kernel_name; m_kernel_info.props.type = xrt_core::xclbin::kernel_properties::kernel_type::dpu; - m_kernel_info.props.counted_auto_restart = xrt_core::xclbin::get_restart_from_ini(kernel_name); - m_kernel_info.props.mailbox = xrt_core::xclbin::get_mailbox_from_ini(kernel_name); - m_kernel_info.props.sw_reset = xrt_core::xclbin::get_sw_reset_from_ini(kernel_name); } // Extract buffer from ELF sections without assuming anything diff --git a/src/runtime_src/core/common/xclbin_parser.cpp b/src/runtime_src/core/common/xclbin_parser.cpp index 1e2119446d..2293f5ae1f 100644 --- a/src/runtime_src/core/common/xclbin_parser.cpp +++ b/src/runtime_src/core/common/xclbin_parser.cpp @@ -86,6 +86,39 @@ convert_to_mailbox_type(const std::string& str) return (*itr).second; } + +// Kernel mailbox +// Needed until meta-data support (Vitis-1147) +// Format is "[/kernel_name/]*" +// mailbox="/kernel1_name/kernel2_name/" +static xrt_core::xclbin::kernel_properties::mailbox_type +get_mailbox_from_ini(const std::string& kname) +{ + static auto mailbox_kernels = xrt_core::config::get_mailbox_kernels(); + return (mailbox_kernels.find("/" + kname + "/") != std::string::npos) + ? xrt_core::xclbin::kernel_properties::mailbox_type::inout + : xrt_core::xclbin::kernel_properties::mailbox_type::none; +} + +// Kernel auto restart counter offset +// Needed until meta-data support (Vitis-1147) +static xrt_core::xclbin::kernel_properties::restart_type +get_restart_from_ini(const std::string& kname) +{ + static auto restart_kernels = xrt_core::config::get_auto_restart_kernels(); + return (restart_kernels.find("/" + kname + "/") != std::string::npos) + ? 1 + : 0; +} + +// Kernel software reset +static bool +get_sw_reset_from_ini(const std::string& kname) +{ + static auto reset_kernels = xrt_core::config::get_sw_reset_kernels(); + return (reset_kernels.find("/" + kname + "/") != std::string::npos); +} + static bool is_sw_emulation() { @@ -955,38 +988,6 @@ get_kernel_arguments(const axlf* top, const std::string& kname) return get_kernel_arguments(xml.first, xml.second, kname); } -// Kernel mailbox -// Needed until meta-data support (Vitis-1147) -// Format is "[/kernel_name/]*" -// mailbox="/kernel1_name/kernel2_name/" -kernel_properties::mailbox_type -get_mailbox_from_ini(const std::string& kname) -{ - static auto mailbox_kernels = xrt_core::config::get_mailbox_kernels(); - return (mailbox_kernels.find("/" + kname + "/") != std::string::npos) - ? xrt_core::xclbin::kernel_properties::mailbox_type::inout - : xrt_core::xclbin::kernel_properties::mailbox_type::none; -} - -// Kernel auto restart counter offset -// Needed until meta-data support (Vitis-1147) -kernel_properties::restart_type -get_restart_from_ini(const std::string& kname) -{ - static auto restart_kernels = xrt_core::config::get_auto_restart_kernels(); - return (restart_kernels.find("/" + kname + "/") != std::string::npos) - ? 1 - : 0; -} - -// Kernel software reset -bool -get_sw_reset_from_ini(const std::string& kname) -{ - static auto reset_kernels = xrt_core::config::get_sw_reset_kernels(); - return (reset_kernels.find("/" + kname + "/") != std::string::npos); -} - kernel_properties get_kernel_properties(const char* xml_data, size_t xml_size, const std::string& kname) { diff --git a/src/runtime_src/core/common/xclbin_parser.h b/src/runtime_src/core/common/xclbin_parser.h index e840c2316f..74c99d9915 100644 --- a/src/runtime_src/core/common/xclbin_parser.h +++ b/src/runtime_src/core/common/xclbin_parser.h @@ -424,15 +424,6 @@ get_project_name(const axlf* top); std::string get_fpga_device_name(const char* xml_data, size_t xml_size); -kernel_properties::mailbox_type -get_mailbox_from_ini(const std::string& kname); - -kernel_properties::restart_type -get_restart_from_ini(const std::string& kname); - -bool -get_sw_reset_from_ini(const std::string& kname); - }} // xclbin, xrt_core #endif