Skip to content

Commit

Permalink
Remove unused exported functions
Browse files Browse the repository at this point in the history
Signed-off-by: rbramand <[email protected]>
  • Loading branch information
rbramand committed Nov 13, 2024
1 parent c2e4500 commit 30de0c6
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 44 deletions.
3 changes: 0 additions & 3 deletions src/runtime_src/core/common/api/xrt_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
65 changes: 33 additions & 32 deletions src/runtime_src/core/common/xclbin_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down Expand Up @@ -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)
{
Expand Down
9 changes: 0 additions & 9 deletions src/runtime_src/core/common/xclbin_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 30de0c6

Please sign in to comment.