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

[3.2 cherry pick] Ensure device context before launching kernel (#3731, #5276) #5465

Open
wants to merge 2 commits into
base: release/3.2.x
Choose a base branch
from

Conversation

bertmaher
Copy link
Collaborator

If a kernel is launched on a thread which has not initialized a CUDA context (as can happen in the linked issue), it will throw an error. A simple fix is to call cudaFree(0) to establish a device context.

Fixes #3729

If a kernel is launched on a thread which has not initialized a CUDA
context (as can happen in the linked issue), it will throw an error. A
simple fix is to call `cudaFree(0)` to establish a device context.

Fixes #3729
@bertmaher bertmaher requested a review from ptillet as a code owner December 19, 2024 18:40
@bertmaher bertmaher requested a review from atalman December 19, 2024 18:40
@peterbell10
Copy link
Contributor

peterbell10 commented Dec 19, 2024

Should also cherry-pick #5276 because this was not enough to support kernels with any pointer arguments.

@bertmaher
Copy link
Collaborator Author

Thanks yes, let’s get that one instead!

@bertmaher
Copy link
Collaborator Author

Added #5276 to this PR so there's one fewer merge to do. Bumping the PT pin here: pytorch/pytorch#143622

@bertmaher bertmaher changed the title [3.2 cherry pick] Ensure device context before launching kernel (#3731) [3.2 cherry pick] Ensure device context before launching kernel (#3731, #5276) Dec 20, 2024
@tmm1
Copy link

tmm1 commented Jan 18, 2025

Friendly ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants