From 7082d182fce997ec716e2b1ccce7e4a8f0d66156 Mon Sep 17 00:00:00 2001 From: Ishita Ghosh Date: Wed, 9 Sep 2026 17:58:42 -0700 Subject: [PATCH] Avoid mutex deadlock for full ELF Flow from get_cfg_map call for HW Context Name Signed-off-by: Ishita Ghosh --- .../plugin/ml_timeline/ml_timeline_plugin.cpp | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/profile/plugin/ml_timeline/ml_timeline_plugin.cpp b/profile/plugin/ml_timeline/ml_timeline_plugin.cpp index 05121e7a..a566c2b4 100644 --- a/profile/plugin/ml_timeline/ml_timeline_plugin.cpp +++ b/profile/plugin/ml_timeline/ml_timeline_plugin.cpp @@ -202,10 +202,12 @@ namespace xdp { mlImpl->updateDevice(hwCtxImpl, deviceId); try { - xrt::hw_context::cfg_type hwCtxCfgMap = xrt_core::hw_context_int::get_cfg_map(hwContext); - auto itr = hwCtxCfgMap.find("hw_context_name"); - if (hwCtxCfgMap.end() != itr) { - mlImpl->setHWContextName(itr->second); + if (!isFullELFFlow) { + xrt::hw_context::cfg_type hwCtxCfgMap = xrt_core::hw_context_int::get_cfg_map(hwContext); + auto itr = hwCtxCfgMap.find("hw_context_name"); + if (hwCtxCfgMap.end() != itr) { + mlImpl->setHWContextName(itr->second); + } } } catch (const std::exception& e) { std::stringstream msg; @@ -293,10 +295,12 @@ namespace xdp { mlImpl->updateDevice(hwCtxImpl, deviceId); try { - xrt::hw_context::cfg_type hwCtxCfgMap = xrt_core::hw_context_int::get_cfg_map(hwContext); - auto itr = hwCtxCfgMap.find("hw_context_name"); - if (hwCtxCfgMap.end() != itr) { - mlImpl->setHWContextName(itr->second); + if (!isFullELFFlow) { + xrt::hw_context::cfg_type hwCtxCfgMap = xrt_core::hw_context_int::get_cfg_map(hwContext); + auto itr = hwCtxCfgMap.find("hw_context_name"); + if (hwCtxCfgMap.end() != itr) { + mlImpl->setHWContextName(itr->second); + } } } catch (const std::exception& e) { std::stringstream msg;