From ea389e9466b151b051ce7f5586cc9d9ed0e6587c Mon Sep 17 00:00:00 2001 From: Jemale Date: Thu, 11 Jan 2024 10:41:49 -0500 Subject: [PATCH] Fix ze_peak subdevice tracking Signed-off-by: Jemale Lockett --- perf_tests/ze_peak/src/ze_peak.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/perf_tests/ze_peak/src/ze_peak.cpp b/perf_tests/ze_peak/src/ze_peak.cpp index 107848fc..b7e8569c 100644 --- a/perf_tests/ze_peak/src/ze_peak.cpp +++ b/perf_tests/ze_peak/src/ze_peak.cpp @@ -898,7 +898,7 @@ long double ZePeak::run_kernel(L0Context context, ze_kernel_handle_t &function, synchronize_command_queue(context); current_sub_device_id++; } - current_sub_device_id = 0; + current_sub_device_id = context.sub_device_count - 1; } } else { synchronize_command_queue(context); @@ -916,7 +916,7 @@ long double ZePeak::run_kernel(L0Context context, ze_kernel_handle_t &function, synchronize_command_queue(context); current_sub_device_id++; } - current_sub_device_id = 0; + current_sub_device_id = context.sub_device_count - 1; } } else { synchronize_command_queue(context); @@ -1071,7 +1071,7 @@ long double ZePeak::run_kernel(L0Context context, ze_kernel_handle_t &function, synchronize_command_queue(context); current_sub_device_id++; } - current_sub_device_id = 0; + current_sub_device_id = context.sub_device_count - 1; } } else { synchronize_command_queue(context); @@ -1302,7 +1302,7 @@ long double ZePeak::run_kernel(L0Context context, ze_kernel_handle_t &function, synchronize_command_queue(context); current_sub_device_id++; } - current_sub_device_id = 0; + current_sub_device_id = context.sub_device_count - 1; } } else { synchronize_command_queue(context); @@ -1484,7 +1484,7 @@ long double ZePeak::run_kernel(L0Context context, ze_kernel_handle_t &function, synchronize_command_queue(context); current_sub_device_id++; } - current_sub_device_id = 0; + current_sub_device_id = context.sub_device_count - 1; } } else { synchronize_command_queue(context); @@ -1595,7 +1595,7 @@ long double ZePeak::run_kernel(L0Context context, ze_kernel_handle_t &function, if (reset_command_list) { if (context.sub_device_count) { - if (context.sub_device_count == current_sub_device_id) { + if (context.sub_device_count == current_sub_device_id + 1) { current_sub_device_id = 0; while (current_sub_device_id < context.sub_device_count) { context.reset_commandlist(context.cmd_list[current_sub_device_id]);