Description
Is this a duplicate?
- I confirmed there appear to be no duplicate issues for this bug and that I agree to the Code of Conduct
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