Skip to content

Commit

Permalink
Merge pull request #1440 from fabiomestre/fabio/opencl_remove_queued_…
Browse files Browse the repository at this point in the history
…hack

[OPENCL] Remove EVENT_STATUS_QUEUED workaround
  • Loading branch information
kbenzie committed Apr 11, 2024
2 parents ac89abf + 44aef87 commit 0d2a972
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions source/adapters/opencl/event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,18 +170,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urEventGetInfo(ur_event_handle_t hEvent,
*reinterpret_cast<ur_command_t *>(pPropValue) = convertCLCommandTypeToUR(
*reinterpret_cast<cl_command_type *>(pPropValue));
} else if (propName == UR_EVENT_INFO_COMMAND_EXECUTION_STATUS) {
/* If the CL_EVENT_COMMAND_EXECUTION_STATUS info value is CL_QUEUED,
* change it to CL_SUBMITTED. sycl::info::event::event_command_status has
* no equivalent to CL_QUEUED.
*
* FIXME UR Port: This should not be part of the UR adapter. Since
* PI_QUEUED exists, SYCL RT should be changed to handle this situation.
* In addition, SYCL RT is relying on PI_QUEUED status to make sure that
* the queues are flushed. */
const auto param_value_int = static_cast<ur_event_status_t *>(pPropValue);
if (*param_value_int == UR_EVENT_STATUS_QUEUED) {
*param_value_int = UR_EVENT_STATUS_SUBMITTED;
} else if (*param_value_int < 0) {
if (*param_value_int < 0) {
// This can contain a negative return code to signify that the command
// terminated in an unexpected way.
*param_value_int = UR_EVENT_STATUS_ERROR;
Expand Down

0 comments on commit 0d2a972

Please sign in to comment.