[cuda toolkit v.12.3] Cuda Capturer causes "InvalidResourceHandle" due to "cudaEventDestroy" called on NULL
doocman opened this issue · comments
Robin Söderholm commented
Describe the bug
When using cudaCapturer, the events created during this stage is sometimes moved-from, causing the native handle to become null. This is then passed to "cudaEventDestroy", which triggers an "InvalidResourceHandle". A simple "if(event==nullptr)" in cudaEventDeleter.
To Reproduce
Steps to reproduce the behavior:
- Create a c++ project.
- Capture an arbitrary kernel.
- Call "cudaGetLastError()": this returns "CudaInvalidResourceHandle" for me. Using "compute-sanitizer" does lead me to the cudaEventDestroy-call. Making the aforementioned quickfix solves the issue for me.
Desktop (please complete the following information):
- OS: Alma Linux 9
- Version 3.6
Tsung-Wei Huang commented
@doocman Thank you for the issue! I have merged your pull request.