Skip to content

Commit

Permalink
Fix ze_peak subdevice tracking
Browse files Browse the repository at this point in the history
Signed-off-by: Jemale Lockett <jemale.lockett@intel.com>
  • Loading branch information
Jemale committed Jan 11, 2024
1 parent 566080e commit ea389e9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions perf_tests/ze_peak/src/ze_peak.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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]);
Expand Down

0 comments on commit ea389e9

Please sign in to comment.