Skip to content

[SYCL][L0] Report events as submitted, not running, until they are completed #9094

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions sycl/plugins/level_zero/pi_level_zero.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4962,8 +4962,12 @@ pi_result piEventGetInfo(pi_event Event, pi_event_info ParamName,

// Level Zero has a much more explicit notion of command submission than
// OpenCL. It doesn't happen unless the user submits a command list. We've
// done it just above so the status is at least PI_EVENT_RUNNING.
pi_int32 Result = PI_EVENT_RUNNING;
// done it just above so the status is at least PI_EVENT_SUBMITTED.
//
// NOTE: We currently cannot tell if command is currently running, so
// it will always show up "submitted" before it is finally "completed".
//
pi_int32 Result = PI_EVENT_SUBMITTED;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would doing this mess with timings, for applications querying for the submit_time?

Copy link
Contributor Author

@smaslov-intel smaslov-intel Apr 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. This is returning "status", not time. So, an event status can now being either "submitted" or "completed". There is a separate interface for querying timestamps of a kernel for all "submit", "start", "end" times:

case PI_PROFILING_INFO_COMMAND_START: {


// Make sure that we query a host-visible event only.
// If one wasn't yet created then don't create it here as well, and
Expand Down