Skip to content

[BUG]: Event timing error misleading #556

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

Closed
1 task done
carterbox opened this issue Apr 10, 2025 · 2 comments · Fixed by #559
Closed
1 task done

[BUG]: Event timing error misleading #556

carterbox opened this issue Apr 10, 2025 · 2 comments · Fixed by #559
Assignees
Labels
bug Something isn't working cuda.core Everything related to the cuda.core module P1 Medium priority - Should do

Comments

@carterbox
Copy link
Contributor

Is this a duplicate?

Type of Bug

Something else

Component

cuda.core

Describe the bug

cuEventElapsedTime() has multiple possibilities for not returning success.

If cuEventRecord() has not been called on either event then CUDA_ERROR_INVALID_HANDLE is returned. If cuEventRecord() has been called on both events but one or both of them has not yet been completed (that is, cuEventQuery() would return CUDA_ERROR_NOT_READY on at least one of the events), CUDA_ERROR_NOT_READY is returned. If either event was created with the CU_EVENT_DISABLE_TIMING flag, then this function will return CUDA_ERROR_INVALID_HANDLE.

However only the last of these explanations is mentioned in the Python error message which replaces these error codes: "Timing capability must be enabled in order to subtract two Events; timing is disabled by default."

The underlying error code should be unsupressed and the user should be directed to the CUDA documentation or we should make the error message more inclusive.

Upstream docs: https://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__EVENT.html#group__CUDA__EVENT_1gdfb1178807353bbcaa9e245da497cf97

How to Reproduce

n/a

Expected behavior

n/a

Operating System

No response

nvidia-smi output

No response

@carterbox carterbox added the bug Something isn't working label Apr 10, 2025
@carterbox
Copy link
Contributor Author

Assign me if desired.

@rwgk
Copy link
Collaborator

rwgk commented Apr 10, 2025

Assign me if desired.

Yes please :-)

The underlying error code should be unsupressed

Purely from memory, I would have thought we talked about it and did something like raise from (conceptually). If that's not the case, I agree completely.

@leofang leofang added the cuda.core Everything related to the cuda.core module label Apr 18, 2025
@leofang leofang added this to the cuda.core beta 4 milestone Apr 18, 2025
@leofang leofang added the P1 Medium priority - Should do label Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cuda.core Everything related to the cuda.core module P1 Medium priority - Should do
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants