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

RuntimeError: Cannot re-initialize CUDA in forked subprocess. #1771

Open
MunirAbobaker opened this issue Nov 30, 2022 · 1 comment
Open

RuntimeError: Cannot re-initialize CUDA in forked subprocess. #1771

MunirAbobaker opened this issue Nov 30, 2022 · 1 comment

Comments

@MunirAbobaker
Copy link

MunirAbobaker commented Nov 30, 2022

CUDA Error inside multiprocessing.pool
I have the following method
x_ encoded = model.encode(x)
it is defined inside a method that is called using multiprocessing.pool and I get the following error from the encode method
RuntimeError: Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method
I used the spawn, but not solved

@shuoyes
Copy link

shuoyes commented Oct 30, 2023

I have the same problem with you,could you tell me the details how to solve?

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

No branches or pull requests

2 participants