Skip to content
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

CUDA graph capture succeeds in Debug mode but fails in Release mode #4376

Closed
1250890838 opened this issue Mar 6, 2025 · 2 comments
Closed
Labels
triaged Issue has been triaged by maintainers waiting for feedback Requires more information from user to make progress on the issue.

Comments

@1250890838
Copy link

1250890838 commented Mar 6, 2025

cudaError_t err = cudaStreamBeginCapture(context_->stream_, cudaStreamCaptureModeGlobal);
void** bindingsptr = bindingsPtr_.data();
bool execute_result = context->context_->enqueueV2(bindingsptr, context_->stream_, nullptr);
err = cudaStreamEndCapture(context_->stream_, &graph_);

when i run this code on release, After executing this statement
err = cudaStreamEndCapture(context_->stream_, &graph_)
the value of variable err is cudaErrorStreamCaptureInvalidated(901) and the value of variable execute_result is false.

but when i run this code on debug,everything is work.the value of variable err is cudaSuccess(0) and the value of variable execute_result is true.

Enviorment:

  • TensorRT Version: 8.4.2.4

  • NVIDIA GPU: RTX3060

  • NVIDIA Driver Version: 472.12

  • CUDA Version: 11.2

  • Operating System: Windows10

how can i solve it? If you need more information, please let me know.

Thanks in advance!

@kevinch-nv kevinch-nv added triaged Issue has been triaged by maintainers waiting for feedback Requires more information from user to make progress on the issue. labels Mar 7, 2025
@kevinch-nv
Copy link
Collaborator

Hard to say without seeing the rest of your code on what's going on.

Are you able to upgrade your CUDA / TRT versions? How are you linking to the TensorRT libraries in your application?

@1250890838
Copy link
Author

1250890838 commented Mar 12, 2025

i found the solution. At this link solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged Issue has been triaged by maintainers waiting for feedback Requires more information from user to make progress on the issue.
Projects
None yet
Development

No branches or pull requests

2 participants