Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/runtime_src/core/common/api/xrt_elf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "core/common/config_reader.h"
#include "core/common/error.h"
#include "core/common/message.h"
#include "core/common/trace.h"
#include "core/common/xclbin_parser.h"

#include <boost/interprocess/streams/bufferstream.hpp>
Expand Down Expand Up @@ -917,6 +918,7 @@ class elf_aie_gen2 : public elf_impl
elf_aie_gen2(ELFIO::elfio&& elfio, elf::platform platform, std::string path)
: elf_impl{std::move(elfio), platform, std::move(path)}
{
XRT_TRACE_POINT_SCOPE(xrt_elf_aie_gen2);
// Parse ELF sections to populate kernel and section maps
parse_sections();
// Initialize all section buffer maps
Expand Down Expand Up @@ -1362,6 +1364,7 @@ class elf_aie_gen2_plus : public elf_impl
elf_aie_gen2_plus(ELFIO::elfio&& elfio, elf::platform platform, std::string path)
: elf_impl{std::move(elfio), platform, std::move(path)}
{
XRT_TRACE_POINT_SCOPE(xrt_elf_aie_gen2_plus);
// Parse ELF sections to populate kernel and section maps
parse_sections();
// Initialize all section buffer maps
Expand Down
24 changes: 13 additions & 11 deletions src/runtime_src/core/common/api/xrt_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ ctx_error_type_to_string(uint32_t ctx_error_type)

if (ctx_error_type >= ctx_error_type_names.size())
return "UNKNOWN";

return ctx_error_type_names[ctx_error_type];
}

Expand All @@ -299,7 +299,7 @@ flags_to_string(uint32_t value, const std::array<std::pair<uint32_t, const char*
{
if (value == 0)
return "NONE";

std::string result;
uint32_t unknown = value;
for (const auto& entry : flags) {
Expand All @@ -320,7 +320,7 @@ flags_to_string(uint32_t value, const std::array<std::pair<uint32_t, const char*
}
return result;
}

// misc_status is a bit mask (ert_uc_health_info); OR known flags and report unknown bits.
static std::string
uc_misc_status_flags_to_string(uint32_t misc_status)
Expand Down Expand Up @@ -2584,6 +2584,7 @@ class run_impl : public std::enable_shared_from_this<run_impl>
void
set_dtrace_control_file(const std::string& path)
{
XRT_TRACE_POINT_SCOPE(xrt_run_set_dtrace_control_file);
std::lock_guard<std::mutex> lock(m_mutex);
if (!m_module) {
throw xrt_core::error(
Expand All @@ -2597,12 +2598,13 @@ class run_impl : public std::enable_shared_from_this<run_impl>
"Cannot set dtrace control file: run has already been started and is "
"still in progress");

xrt_core::module_int::set_dtrace_control_file(m_module, path);
if (m_dpu_payload)
xrt_core::module_int::fill_ert_dpu_data(m_module, m_dpu_payload);

// Store only after module and command payload are updated
// clone inherits this
m_dtrace_control_file = path;
if (m_module) {
xrt_core::module_int::set_dtrace_control_file(m_module, path);
if (m_dpu_payload)
xrt_core::module_int::fill_ert_dpu_data(m_module, m_dpu_payload);
}
}

// run_type() - constructor
Expand Down Expand Up @@ -3067,7 +3069,7 @@ class run_impl : public std::enable_shared_from_this<run_impl>
{
if (state != ERT_CMD_STATE_TIMEOUT)
return;

auto file = xrt_core::config::get_aie_coredump_file();
if (file.empty())
return;
Expand Down Expand Up @@ -4908,10 +4910,10 @@ aie_error_message_v1(const ert_packet* epkt, const std::string& msg,
// (e.g. ELF loaded from a buffer rather than a file path).
if (!kernel_instance.empty())
oss << "Kernel Instance: " << kernel_instance;

if (!elf_filename.empty())
oss << "\nELF File: " << elf_filename;

if (!elf_uuid.empty())
oss << "\nELF UUID: " << elf_uuid;

Expand Down
4 changes: 4 additions & 0 deletions src/runtime_src/core/common/api/xrt_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#define XRT_CORE_COMMON_SOURCE // in same dll as core_common
#include "core/common/config_reader.h"
#include "core/common/message.h"
#include "core/common/trace.h"

#include "xrt/experimental/xrt_module.h"
#include "xrt/experimental/xrt_aie.h"
#include "xrt/experimental/xrt_elf.h"
Expand Down Expand Up @@ -555,6 +557,7 @@ class module_run_aie_gen2 : public module_run
: module_run(elf, hw_context, id)
, m_config(std::get<xrt::module_config_aie_gen2>(m_elf_impl->get_module_config(id)))
{
XRT_TRACE_POINT_SCOPE(xrt_module_run_aie_gen2);
create_ctrlpkt_buf(ctrlpkt_bo);
create_ctrlpkt_pm_bufs();
create_instruction_buf();
Expand Down Expand Up @@ -1026,6 +1029,7 @@ class module_run_aie_gen2_plus : public module_run
: module_run(elf, hw_context, id)
, m_config(std::get<xrt::module_config_aie_gen2_plus>(m_elf_impl->get_module_config(id)))
{
XRT_TRACE_POINT_SCOPE(xrt_module_run_aie_gen2_plus);
initialize_dtrace_buf(""); // use config path by default
create_ctrlpkt_bufs();
create_instruction_buffer();
Expand Down
Loading