From 400ba9267e89e907cb79c1a854b411a1716c1a53 Mon Sep 17 00:00:00 2001 From: Ishita Ghosh Date: Tue, 16 Jun 2026 14:43:35 -0700 Subject: [PATCH 1/2] Report power mode instead of clock frequency for Client Signed-off-by: Ishita Ghosh --- profile/plugin/ml_timeline/clientDev/ml_timeline.cpp | 4 +++- profile/plugin/ml_timeline/clientDev/ml_timeline.h | 4 ++++ profile/plugin/ml_timeline/ml_timeline_impl.h | 2 ++ profile/plugin/ml_timeline/ml_timeline_plugin.cpp | 9 +++++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/profile/plugin/ml_timeline/clientDev/ml_timeline.cpp b/profile/plugin/ml_timeline/clientDev/ml_timeline.cpp index ef466f26..58835341 100644 --- a/profile/plugin/ml_timeline/clientDev/ml_timeline.cpp +++ b/profile/plugin/ml_timeline/clientDev/ml_timeline.cpp @@ -192,7 +192,9 @@ namespace xdp { ptSchema.put("patch", "0"); ptHeader.add_child("schema_version", ptSchema); ptHeader.put("device", "Client"); - ptHeader.put("clock_freq_MHz", 1000); + if (!powerMode.empty()) { + ptHeader.put("power_mode", powerMode); + } ptHeader.put("id_size", sizeof(uint32_t)); ptHeader.put("cycle_size", 2*sizeof(uint32_t)); ptHeader.put("buffer_size", mBufSz); diff --git a/profile/plugin/ml_timeline/clientDev/ml_timeline.h b/profile/plugin/ml_timeline/clientDev/ml_timeline.h index d33e42e7..8922e7ec 100644 --- a/profile/plugin/ml_timeline/clientDev/ml_timeline.h +++ b/profile/plugin/ml_timeline/clientDev/ml_timeline.h @@ -39,6 +39,10 @@ namespace xdp { virtual void updateDevice(void* hwCtxImpl, uint64_t devId = 0); virtual void finishflushDevice(void* hwCtxImpl, uint64_t implId = 0); + + virtual void setPowerMode(const std::string &pMode) { + powerMode = pMode; + } }; } diff --git a/profile/plugin/ml_timeline/ml_timeline_impl.h b/profile/plugin/ml_timeline/ml_timeline_impl.h index a8a49a8b..d087eefa 100644 --- a/profile/plugin/ml_timeline/ml_timeline_impl.h +++ b/profile/plugin/ml_timeline/ml_timeline_impl.h @@ -35,6 +35,8 @@ namespace xdp { virtual void updateDevice(void*, uint64_t) = 0; virtual void finishflushDevice(void*, uint64_t) = 0; + virtual void setPowerMode(const std::string &) {} + void setHWContextName(const std::string &nm) { mHwCtxName = nm; } diff --git a/profile/plugin/ml_timeline/ml_timeline_plugin.cpp b/profile/plugin/ml_timeline/ml_timeline_plugin.cpp index edbb3fa2..05121e7a 100644 --- a/profile/plugin/ml_timeline/ml_timeline_plugin.cpp +++ b/profile/plugin/ml_timeline/ml_timeline_plugin.cpp @@ -213,6 +213,15 @@ namespace xdp { xrt_core::message::send(xrt_core::message::severity_level::debug, "XRT", msg.str()); } + try { + const auto pmode = xrt_core::device_query(coreDevice); + mlImpl->setPowerMode(xrt_core::query::performance_mode::parse_status(pmode)); + } catch (const xrt_core::query::no_such_key&) { + xrt_core::message::send(xrt_core::message::severity_level::warning, "XRT", "Failed to retrieve Power Mode"); + } catch (const std::exception &) { + xrt_core::message::send(xrt_core::message::severity_level::warning, "XRT", "Failed to retrieve Power Mode"); + } + #elif defined (XDP_VE2_BUILD) if (mMultiImpl.find(hwCtxImpl) != mMultiImpl.end()) { From 376cbbaf233f2ccc46d578f8d98dff5b66d18e55 Mon Sep 17 00:00:00 2001 From: Ishita Ghosh Date: Tue, 16 Jun 2026 15:47:38 -0700 Subject: [PATCH 2/2] Report power mode instead of clock frequency for Client Signed-off-by: Ishita Ghosh --- profile/plugin/ml_timeline/clientDev/ml_timeline.h | 1 + 1 file changed, 1 insertion(+) diff --git a/profile/plugin/ml_timeline/clientDev/ml_timeline.h b/profile/plugin/ml_timeline/clientDev/ml_timeline.h index 8922e7ec..fed1d0c0 100644 --- a/profile/plugin/ml_timeline/clientDev/ml_timeline.h +++ b/profile/plugin/ml_timeline/clientDev/ml_timeline.h @@ -30,6 +30,7 @@ namespace xdp { { std::unique_ptr mResultBOHolder; xrt_core::bo_int::use_type mBOType; + std::string powerMode; public : MLTimelineClientDevImpl(VPDatabase* dB, uint32_t sz,