From 8a628697ca9831cc11a18a33775a7398537f164a Mon Sep 17 00:00:00 2001 From: pgschuey Date: Thu, 1 Oct 2026 08:42:46 -0600 Subject: [PATCH 1/2] fixes for channel 1 (#124) Signed-off-by: Paul Schumacher --- profile/plugin/aie_profile/client/aie_profile.cpp | 2 +- profile/plugin/aie_profile/edge/aie_profile.cpp | 2 +- profile/plugin/aie_profile/ve2/aie_profile.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/profile/plugin/aie_profile/client/aie_profile.cpp b/profile/plugin/aie_profile/client/aie_profile.cpp index a3749953..7f030ab1 100644 --- a/profile/plugin/aie_profile/client/aie_profile.cpp +++ b/profile/plugin/aie_profile/client/aie_profile.cpp @@ -154,7 +154,7 @@ namespace xdp { auto iter0 = configChannel0.find(tile); auto iter1 = configChannel1.find(tile); uint8_t channel0 = (iter0 == configChannel0.end()) ? 0 : iter0->second; - uint8_t channel1 = (iter1 == configChannel1.end()) ? channel0 : iter1->second; + uint8_t channel1 = (iter1 == configChannel1.end()) ? 1 : iter1->second; // Modify events as needed aie::profile::modifyEvents(type, subtype, channel0, startEvents, metadata->getHardwareGen()); diff --git a/profile/plugin/aie_profile/edge/aie_profile.cpp b/profile/plugin/aie_profile/edge/aie_profile.cpp index afc78315..a0ecffbd 100644 --- a/profile/plugin/aie_profile/edge/aie_profile.cpp +++ b/profile/plugin/aie_profile/edge/aie_profile.cpp @@ -339,7 +339,7 @@ namespace xdp { auto iter0 = configChannel0.find(tile); auto iter1 = configChannel1.find(tile); uint8_t channel0 = (iter0 == configChannel0.end()) ? 0 : iter0->second; - uint8_t channel1 = (iter1 == configChannel1.end()) ? channel0 : iter1->second; + uint8_t channel1 = (iter1 == configChannel1.end()) ? 1 : iter1->second; // Modify events as needed aie::profile::modifyEvents(type, subtype, channel0, startEvents, metadata->getHardwareGen()); diff --git a/profile/plugin/aie_profile/ve2/aie_profile.cpp b/profile/plugin/aie_profile/ve2/aie_profile.cpp index 86bb0fc0..1c8b9c11 100644 --- a/profile/plugin/aie_profile/ve2/aie_profile.cpp +++ b/profile/plugin/aie_profile/ve2/aie_profile.cpp @@ -394,7 +394,7 @@ namespace xdp { auto iter0 = configChannel0.find(tile); auto iter1 = configChannel1.find(tile); uint8_t channel0 = (iter0 == configChannel0.end()) ? 0 : iter0->second; - uint8_t channel1 = (iter1 == configChannel1.end()) ? channel0 : iter1->second; + uint8_t channel1 = (iter1 == configChannel1.end()) ? 1 : iter1->second; // Modify events as needed aie::profile::modifyEvents(type, subtype, channel0, startEvents, metadata->getHardwareGen()); @@ -957,7 +957,7 @@ namespace xdp { auto iter0 = configChannel0.find(tile); auto iter1 = configChannel1.find(tile); uint8_t channel0 = (iter0 == configChannel0.end()) ? 0 : iter0->second; - uint8_t channel1 = (iter1 == configChannel1.end()) ? channel0 : iter1->second; + uint8_t channel1 = (iter1 == configChannel1.end()) ? 1 : iter1->second; std::vector channels = {channel0, channel1}; // Modify events as needed From 584a3e90d73bf9f05855bf40a9440775f73674f7 Mon Sep 17 00:00:00 2001 From: Meghna Kondapalli Date: Mon, 5 Oct 2026 17:05:54 -0600 Subject: [PATCH 2/2] Change AIE1 interface tile trace start event from TRUE to USER_EVENT_2 Signed-off-by: Meghna Kondapalli --- profile/plugin/aie_trace/edge/aie_trace.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/profile/plugin/aie_trace/edge/aie_trace.cpp b/profile/plugin/aie_trace/edge/aie_trace.cpp index 3590cf7f..c4959a13 100755 --- a/profile/plugin/aie_trace/edge/aie_trace.cpp +++ b/profile/plugin/aie_trace/edge/aie_trace.cpp @@ -105,7 +105,10 @@ namespace xdp { // Memory/interface tile trace is flushed at end of run memoryTileTraceStartEvent = XAIE_EVENT_TRUE_MEM_TILE; memoryTileTraceEndEvent = XAIE_EVENT_USER_EVENT_1_MEM_TILE; - interfaceTileTraceStartEvent = XAIE_EVENT_TRUE_PL; + // Start on a user event so trace doesn't restart after the end-of-run flush + // Only apply this for VCK190 as VEK280 only has user events 0 and 1 + interfaceTileTraceStartEvent = xdp::aie::isAIE1(hwGen) ? XAIE_EVENT_USER_EVENT_2_PL + : XAIE_EVENT_TRUE_PL; interfaceTileTraceEndEvent = XAIE_EVENT_USER_EVENT_1_PL; } @@ -943,6 +946,12 @@ namespace xdp { (db->getStaticInfo()).addAIECfgTile(deviceId, cfgTile); } // For tiles + // Start interface tile trace now that all tiles are configured + if (interfaceTileTraceStartEvent != XAIE_EVENT_TRUE_PL) { + for (const auto& loc : interfaceTileTraceFlushLocs) + XAie_EventGenerate(aieDevInst, loc, XAIE_PL_MOD, interfaceTileTraceStartEvent); + } + // Report and store trace events per tile for (int m = 0; m < static_cast(module_type::num_types); ++m) { aie::trace::printTraceEventStats(m, mNumTileTraceEvents[m]);