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

Conversation

bjoernknafla
Copy link
Contributor

Return the correct PI API error code when trying to query events for
commands on queues that have not enabled profiling.

Signed-off-by: Bjoern Knafla [email protected]

Return the correct PI API error code when trying to query events for
commands on queues that have not enabled profiling.

Signed-off-by: Bjoern Knafla <[email protected]>
@bjoernknafla bjoernknafla requested a review from a team as a code owner July 2, 2020 18:47
@Ruyk Ruyk added the cuda CUDA back-end label Jul 2, 2020
Copy link
Contributor

@smaslov-intel smaslov-intel left a comment

Choose a reason for hiding this comment

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

LGTM, just a question to clarify the intent

@@ -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.

@bader bader merged commit 76bf2ed into intel:sycl Jul 6, 2020
@bjoernknafla bjoernknafla deleted the bjoern/fix-cuda-pieventgetprofilinginfo-with-disabled-profiling branch July 21, 2020 15:38
jsji pushed a commit that referenced this pull request Jun 8, 2023
Flags operand is not optional, fill it with DebugInfoNone value (see #1965
for clarifications why it could not be generated by clang or by LLVM
environment).

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@7a54cde
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda CUDA back-end
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants