Skip to content

Commit

Permalink
VITIS-13050 and VITIS-9682 (Xilinx#8382)
Browse files Browse the repository at this point in the history
Signed-off-by: AShivangi <[email protected]>
  • Loading branch information
AShivangi authored Aug 29, 2024
1 parent cd5c7f4 commit 587341b
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 6 deletions.
12 changes: 12 additions & 0 deletions src/runtime_src/core/common/query_requests.h
Original file line number Diff line number Diff line change
Expand Up @@ -1651,17 +1651,29 @@ struct aie_tiles_status_info : request
// Hardware contexts may share the same aie partition.
struct aie_partition_info : request
{

struct qos_info {
uint64_t gops; // Giga operations per second
uint64_t egops; // Effective giga operations per second
uint64_t fps; // Frames per second
uint64_t dma_bandwidth; // DMA bandwidth
uint64_t latency; // Frame response latency
uint64_t frame_exec_time;// Frame execution time
uint64_t priority; // Request priority
};
struct data
{
hw_context_info::metadata metadata;
uint64_t start_col;
uint64_t num_cols;
int pid;
uint64_t instruction_mem;
uint64_t command_submissions;
uint64_t command_completions;
uint64_t migrations;
uint64_t preemptions;
uint64_t errors;
qos_info QoS;
};

using result_type = std::vector<struct data>;
Expand Down
33 changes: 27 additions & 6 deletions src/runtime_src/core/tools/common/reports/ReportAiePartitions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "ReportAiePartitions.h"

#include "core/common/query_requests.h"
#include "core/common/utils.h"
#include "tools/common/Table2D.h"
#include "tools/common/XBUtilitiesCore.h"

Expand All @@ -31,11 +32,19 @@ populate_aie_partition(const xrt_core::device* device)

boost::property_tree::ptree pt_entry;
pt_entry.put("context_id", entry.metadata.id);
pt_entry.put("instr_bo_mem", entry.instruction_mem);
pt_entry.put("command_submissions", entry.command_submissions);
pt_entry.put("command_completions", entry.command_completions);
pt_entry.put("migrations", entry.migrations);
pt_entry.put("errors", entry.errors);

xrt_core::query::aie_partition_info::qos_info qos = entry.QoS;
pt_entry.put("gops", qos.gops);
pt_entry.put("egops", qos.egops);
pt_entry.put("fps", qos.fps);
pt_entry.put("latency", qos.latency);
pt_entry.put("priority", qos.priority);

partition.first->second.push_back(std::make_pair("", pt_entry));
}

Expand Down Expand Up @@ -101,11 +110,17 @@ writeReport(const xrt_core::device* /*_pDevice*/,
}

const std::vector<Table2D::HeaderData> table_headers = {
{"Context ID", Table2D::Justification::left},
{"Submissions", Table2D::Justification::left},
{"Completions", Table2D::Justification::left},
{"Migrations", Table2D::Justification::left},
{"Errors", Table2D::Justification::left},
{"Ctx ID", Table2D::Justification::left},
{"Instr BO", Table2D::Justification::left},
{"Sub", Table2D::Justification::left},
{"Compl", Table2D::Justification::left},
{"Migr", Table2D::Justification::left},
{"Err", Table2D::Justification::left},
{"Prio", Table2D::Justification::left},
{"GOPS", Table2D::Justification::left},
{"EGOPS", Table2D::Justification::left},
{"FPS", Table2D::Justification::left},
{"Latency", Table2D::Justification::left}
};
Table2D context_table(table_headers);

Expand All @@ -115,10 +130,16 @@ writeReport(const xrt_core::device* /*_pDevice*/,

const std::vector<std::string> entry_data = {
hw_context.get<std::string>("context_id"),
xrt_core::utils::unit_convert(hw_context.get<uint64_t>("instr_bo_mem")),
hw_context.get<std::string>("command_submissions"),
hw_context.get<std::string>("command_completions"),
hw_context.get<std::string>("migrations"),
std::to_string(hw_context.get<uint64_t>("errors"))
std::to_string(hw_context.get<uint64_t>("errors")),
std::to_string(hw_context.get<uint64_t>("priority")),
std::to_string(hw_context.get<uint64_t>("gops")),
std::to_string(hw_context.get<uint64_t>("egops")),
std::to_string(hw_context.get<uint64_t>("fps")),
std::to_string(hw_context.get<uint64_t>("latency"))
};
context_table.addEntry(entry_data);
}
Expand Down

0 comments on commit 587341b

Please sign in to comment.