Skip to content

Commit

Permalink
Fix Debug build warning and error (#8433)
Browse files Browse the repository at this point in the history
  • Loading branch information
IshitaGhosh committed Sep 19, 2024
1 parent d3427d5 commit a7905cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,9 @@ namespace xdp {
}

// Get partition columns
// NOTE: for now, assume a single partition
uint8_t startCol = 0;
boost::property_tree::ptree aiePartitionPt = xdp::aie::getAIEPartitionInfoClient(metadata->getHandle());
for (const auto& e : aiePartitionPt) {
startCol = static_cast<uint8_t>(e.second.get<uint64_t>("start_col"));
// Currently, assuming only one Hw Context is alive at a time
break;
}
// Currently, assuming only one Hw Context is alive at a time
uint8_t startCol = static_cast<uint8_t>(aiePartitionPt.front().second.get<uint64_t>("start_col"));

//Start recording the transaction
XAie_StartTransaction(&aieDevInst, XAIE_TRANSACTION_DISABLE_AUTO_FLUSH);
Expand Down
27 changes: 7 additions & 20 deletions src/runtime_src/xdp/profile/plugin/aie_trace/client/aie_trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,10 @@ namespace xdp {

void AieTrace_WinImpl::build2ChannelBroadcastNetwork(void *hwCtxImpl, uint8_t broadcastId1, uint8_t broadcastId2, XAie_Events event) {

uint8_t startCol = 0, numCols = 0;
boost::property_tree::ptree aiePartitionPt = xdp::aie::getAIEPartitionInfoClient(hwCtxImpl);
for (const auto& e : aiePartitionPt) {
startCol = static_cast<uint8_t>(e.second.get<uint64_t>("start_col"));
numCols = static_cast<uint8_t>(e.second.get<uint64_t>("num_cols"));
// Currently, assuming only one Hw Context is alive at a time
break;
}
// Currently, assuming only one Hw Context is alive at a time
uint8_t startCol = static_cast<uint8_t>(aiePartitionPt.front().second.get<uint64_t>("start_col"));
uint8_t numCols = static_cast<uint8_t>(aiePartitionPt.front().second.get<uint64_t>("num_cols"));

std::vector<uint8_t> maxRowAtCol(startCol + numCols, 0);
for (auto& tileMetric : metadata->getConfigMetrics()) {
Expand Down Expand Up @@ -298,13 +294,9 @@ namespace xdp {
//Start recording the transaction
XAie_StartTransaction(&aieDevInst, XAIE_TRANSACTION_DISABLE_AUTO_FLUSH);

uint8_t startCol = 0;
boost::property_tree::ptree aiePartitionPt = xdp::aie::getAIEPartitionInfoClient(hwCtxImpl);
for (const auto& e : aiePartitionPt) {
startCol = static_cast<uint8_t>(e.second.get<uint64_t>("start_col"));
// Currently, assuming only one Hw Context is alive at a time
break;
}
// Currently, assuming only one Hw Context is alive at a time
uint8_t startCol = static_cast<uint8_t>(aiePartitionPt.front().second.get<uint64_t>("start_col"));

uint8_t broadcastId1 = 6;
uint8_t broadcastId2 = 7;
Expand Down Expand Up @@ -1022,14 +1014,9 @@ namespace xdp {
(void)deviceId;

// Get partition columns
// NOTE: for now, assume a single partition
uint8_t startCol = 0;
boost::property_tree::ptree aiePartitionPt = xdp::aie::getAIEPartitionInfoClient(hwCtxImpl);
for (const auto& e : aiePartitionPt) {
startCol = static_cast<uint8_t>(e.second.get<uint64_t>("start_col"));
// Currently, assuming only one Hw Context is alive at a time
break;
}
// Currently, assuming only one Hw Context is alive at a time
uint8_t startCol = static_cast<uint8_t>(aiePartitionPt.front().second.get<uint64_t>("start_col"));

std::string startType = xrt_core::config::get_aie_trace_settings_start_type();
unsigned int startLayer = xrt_core::config::get_aie_trace_settings_start_layer();
Expand Down

0 comments on commit a7905cb

Please sign in to comment.