diff --git a/src/runtime_src/core/common/info_telemetry.cpp b/src/runtime_src/core/common/info_telemetry.cpp index 463d01f8f9..40de25534f 100644 --- a/src/runtime_src/core/common/info_telemetry.cpp +++ b/src/runtime_src/core/common/info_telemetry.cpp @@ -44,17 +44,16 @@ aie2_preemption_info(const xrt_core::device* device) { const auto data = xrt_core::device_query(device); boost::property_tree::ptree pt_rtos_array; + int user_task = 0; + for (const auto& kp : data) { boost::property_tree::ptree pt_preempt; - auto populate_value = [](uint64_t value) { - return (value == static_cast(-1) || value == UINT64_MAX) ? "N/A" : std::to_string(value); - }; + auto populate_value = [](uint64_t value) { + return (value == static_cast(-1) || value == UINT64_MAX) ? "N/A" : std::to_string(value); + }; - //add check if a workload is running - if(static_cast(kp.preemption_data.slot_index) == -1) - continue; - pt_preempt.put("user_task", populate_value(kp.user_task)); + pt_preempt.put("user_task", user_task++); pt_preempt.put("slot_index", populate_value(kp.preemption_data.slot_index)); pt_preempt.put("preemption_flag_set", populate_value(kp.preemption_data.preemption_flag_set)); pt_preempt.put("preemption_flag_unset", populate_value(kp.preemption_data.preemption_flag_unset));