From e67d774365744baa3bdc34214247680ef3316735 Mon Sep 17 00:00:00 2001 From: Vinod Pangul <146476973+vipangul@users.noreply.github.com> Date: Thu, 29 Aug 2024 17:29:50 -0700 Subject: [PATCH] [XDP] Fix the incorrect xclbin type deduction & add safe check (#8380) --- .../xdp/profile/database/static_info_database.cpp | 2 ++ .../xdp/profile/plugin/aie_trace/aie_trace_plugin.cpp | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/runtime_src/xdp/profile/database/static_info_database.cpp b/src/runtime_src/xdp/profile/database/static_info_database.cpp index 55b83e50d5b..f41975b3a3a 100644 --- a/src/runtime_src/xdp/profile/database/static_info_database.cpp +++ b/src/runtime_src/xdp/profile/database/static_info_database.cpp @@ -2261,6 +2261,8 @@ namespace xdp { is_aie_available = true; data = xrt_core::xclbin_int::get_axlf_section(xclbin, IP_LAYOUT); + if (!data.first || !data.second) + data = xrt_core::xclbin_int::get_axlf_section(xclbin, DEBUG_IP_LAYOUT); if (data.first && data.second) is_pl_available = true; diff --git a/src/runtime_src/xdp/profile/plugin/aie_trace/aie_trace_plugin.cpp b/src/runtime_src/xdp/profile/plugin/aie_trace/aie_trace_plugin.cpp index 9cc632bce7c..b0e91d105d6 100644 --- a/src/runtime_src/xdp/profile/plugin/aie_trace/aie_trace_plugin.cpp +++ b/src/runtime_src/xdp/profile/plugin/aie_trace/aie_trace_plugin.cpp @@ -238,7 +238,10 @@ void AieTracePluginUnified::updateAIEDevice(void *handle) { // First, check against memory bank size // NOTE: Check first buffer for PLIO; assume bank 0 for GMIO - uint8_t memIndex = isPLIO ? deviceIntf->getAIETs2mmMemIndex(0) : 0; + uint8_t memIndex = 0; + if (isPLIO && (deviceIntf != nullptr)) + memIndex = deviceIntf->getAIETs2mmMemIndex(0); + Memory *memory = (db->getStaticInfo()).getMemory(deviceID, memIndex); if (memory != nullptr) {