Skip to content

Commit 9da2412

Browse files
authored
Fix to report tile master/slave using metricSet used for that tile (#8942)
1 parent 9234422 commit 9da2412

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/runtime_src/xdp/profile/plugin/aie_profile/edge/aie_profile.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,7 @@ namespace xdp {
160160
0 : static_cast<uint8_t>(tile.stream_ids.at(portnum));
161161
uint8_t idToReport = (tile.subtype == io_type::GMIO) ? channel : streamPortId;
162162
uint8_t isChannel = (tile.subtype == io_type::GMIO) ? 1 : 0;
163-
uint8_t isMaster = (portnum >= tile.is_master_vec.size()) ?
164-
0 : static_cast<uint8_t>(tile.is_master_vec.at(portnum));
163+
uint8_t isMaster = aie::isInputSet(type, metricSet) ? 0 : 1;
165164

166165
return ((isMaster << PAYLOAD_IS_MASTER_SHIFT)
167166
| (isChannel << PAYLOAD_IS_CHANNEL_SHIFT) | idToReport);

src/runtime_src/xdp/profile/plugin/aie_profile/ve2/aie_profile.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,7 @@ namespace xdp {
163163
0 : static_cast<uint8_t>(tile.stream_ids.at(portnum));
164164
uint8_t idToReport = (tile.subtype == io_type::GMIO) ? channel : streamPortId;
165165
uint8_t isChannel = (tile.subtype == io_type::GMIO) ? 1 : 0;
166-
uint8_t isMaster = (portnum >= tile.is_master_vec.size()) ?
167-
0 : static_cast<uint8_t>(tile.is_master_vec.at(portnum));
166+
uint8_t isMaster = aie::isInputSet(type, metricSet) ? 0 : 1;
168167

169168
return ((isMaster << PAYLOAD_IS_MASTER_SHIFT)
170169
| (isChannel << PAYLOAD_IS_CHANNEL_SHIFT) | idToReport);

0 commit comments

Comments
 (0)