Skip to content

[SYCL][CUDA] Fix event profiling queries #2034

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
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
5 changes: 5 additions & 0 deletions sycl/plugins/cuda/pi_cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2703,6 +2703,11 @@ pi_result cuda_piEventGetProfilingInfo(pi_event event,

assert(event != nullptr);

pi_queue queue = event->get_queue();
if (queue == nullptr || !(queue->properties_ & PI_QUEUE_PROFILING_ENABLE)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

are you sure we should return this error when queue is null? what is the event without an associated queue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only user events do not have queues associated with them - and while we do not support user events, this is the error code returned when trying to get performance data from one.

return PI_PROFILING_INFO_NOT_AVAILABLE;
}

switch (param_name) {
case PI_PROFILING_INFO_COMMAND_QUEUED:
case PI_PROFILING_INFO_COMMAND_SUBMIT:
Expand Down