Skip to content

Commit

Permalink
pass in correct type for force preemption (#8501)
Browse files Browse the repository at this point in the history
Signed-off-by: AShivangi <[email protected]>
  • Loading branch information
AShivangi authored Oct 8, 2024
1 parent 36c792b commit 74c1593
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/runtime_src/core/common/query_requests.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
4 changes: 2 additions & 2 deletions src/runtime_src/core/tools/xbutil2/OO_Preemption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ OO_Preemption::execute(const SubCmdOptions& _options) const

try {
if (boost::iequals(m_action, "enable")) {
xrt_core::device_update<xrt_core::query::preemption>(device.get(), 0); // default
xrt_core::device_update<xrt_core::query::preemption>(device.get(), static_cast<uint32_t>(1)); // default
}
else if (boost::iequals(m_action, "disable")) {
xrt_core::device_update<xrt_core::query::preemption>(device.get(), 1);
xrt_core::device_update<xrt_core::query::preemption>(device.get(), static_cast<uint32_t>(0));
}
else {
throw xrt_core::error(boost::str(boost::format("Invalid force-preemption value: '%s'\n") % m_action));
Expand Down

0 comments on commit 74c1593

Please sign in to comment.