From 74c1593d74dd4f8965c3ab8bed7b7a204ba55aea Mon Sep 17 00:00:00 2001 From: AShivangi <124935354+AShivangi@users.noreply.github.com> Date: Tue, 8 Oct 2024 22:13:23 +0530 Subject: [PATCH] pass in correct type for force preemption (#8501) Signed-off-by: AShivangi --- src/runtime_src/core/common/query_requests.h | 2 +- src/runtime_src/core/tools/xbutil2/OO_Preemption.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/runtime_src/core/common/query_requests.h b/src/runtime_src/core/common/query_requests.h index b14549f2624..26e596da1d0 100644 --- a/src/runtime_src/core/common/query_requests.h +++ b/src/runtime_src/core/common/query_requests.h @@ -3808,7 +3808,7 @@ struct performance_mode : request /* * this request force enables or disables pre-emption globally - * 0: enable; 1: disable + * 1: enable; 0: disable */ struct preemption : request { diff --git a/src/runtime_src/core/tools/xbutil2/OO_Preemption.cpp b/src/runtime_src/core/tools/xbutil2/OO_Preemption.cpp index 5d3b837a779..b50db4a15c2 100644 --- a/src/runtime_src/core/tools/xbutil2/OO_Preemption.cpp +++ b/src/runtime_src/core/tools/xbutil2/OO_Preemption.cpp @@ -85,10 +85,10 @@ OO_Preemption::execute(const SubCmdOptions& _options) const try { if (boost::iequals(m_action, "enable")) { - xrt_core::device_update(device.get(), 0); // default + xrt_core::device_update(device.get(), static_cast(1)); // default } else if (boost::iequals(m_action, "disable")) { - xrt_core::device_update(device.get(), 1); + xrt_core::device_update(device.get(), static_cast(0)); } else { throw xrt_core::error(boost::str(boost::format("Invalid force-preemption value: '%s'\n") % m_action));