device_execution: Modify the check in profiling subtest (#962)

As per the spec CL_PROFILING_COMMAND_COMPLETE is required to
be equal to CL_PROFILING_COMMAND_END only on devices that
do not support the on-device queue.

For other cases it can be >= CL_PROFILING_COMMAND_END
This commit is contained in:
Sreelakshmi Haridas Maruthur
2020-09-17 02:36:43 -06:00
committed by GitHub
parent 90b57a2d7a
commit f627a68dd6

View File

@@ -142,23 +142,12 @@ int test_enqueue_profiling(cl_device_id device, cl_context context,
sizeof(complete), &complete, NULL); sizeof(complete), &complete, NULL);
test_error(err_ret, "clGetEventProfilingInfo() failed"); test_error(err_ret, "clGetEventProfilingInfo() failed");
if (level == 0) if (end > complete)
{ {
if (end != complete) log_error(
{ "Profiling END should be smaller than or equal to COMPLETE for "
log_error("Profiling END should be the same as COMPLETE for " "kernels that use the on-device queue");
"kernels without children"); return -1;
return -1;
}
}
else
{
if (end > complete)
{
log_error("Profiling END should be smaller than COMPLETE for "
"kernels with device side children");
return -1;
}
} }
log_info("Profiling info for '%s' kernel is OK for level %d.\n", log_info("Profiling info for '%s' kernel is OK for level %d.\n",