-
Notifications
You must be signed in to change notification settings - Fork 980
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
Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method #3662
Comments
Hello The same issue applies for me as @serdarildercaglar mentioned above. It will be very helpful for us to fix this please.. |
hi guys, |
@sivanantha321 Could you please help me with this problem? Please let me know if you can address it. |
Will look into it |
Hi @bunyaminkeles. Could you fix the issue? Is there any improvement on your side? |
Not really. No improvements yet
Android için Outlook<https://aka.ms/AAb9ysg> edinin
…________________________________
From: Serdar ÇAĞLAR ***@***.***>
Sent: Tuesday, May 14, 2024 10:41:13 PM
To: kserve/kserve ***@***.***>
Cc: Bünyamin Keleş ***@***.***>; Mention ***@***.***>
Subject: Re: [kserve/kserve] Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method (Issue #3662)
Hi @bunyaminkeles<https://github.com/bunyaminkeles>. Could you fix the issue? Is there any improvement on your side?
I am about to launch my project to production but I couldn't fix this issue. If I cannot employ workers, I cannot use multi-process.
—
Reply to this email directly, view it on GitHub<#3662 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ANZCCTYFVT7JQ3C3RLGH3RTZCJSFTAVCNFSM6AAAAABHELYAT2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJRGAYTCNRXGY>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
For now, you can try with ray serve for take advantage of multiple workers. https://kserve.github.io/website/latest/modelserving/v1beta1/custom/custom_model/#parallel-model-inference. I recommend using kserve 0.11 as 0.12 release seems broken with ray serve |
I used ray serve and it was successful in multiprocessing. However, when I use ray serve, as the number of replicas increases, resource consumption increases, and whether the server is busy or not, these replicas are constantly running, which negatively affects the cost. I will manage with ray serve until the Workers' problem is solved. Thank you very much. Sincerely best wishes. |
@serdarildercaglar are you using multiprocessing mainly to increase the gpu utilization ? Just curious about the motivation |
Thanks for response @yuzisun. |
Why not setting the replica to 2 or more as that’s how kubernetes scales? The worker count is mainly for saving expensive compute resource like gpu to scale up within the container, but at some point it is bounded by the resource limit of the container and you can‘t scale as much as it can with kubernetes replicas. |
I may not have been able to explain it fully because of the language barrier. Thank you for trying to help. |
/kind bug
What steps did you take and what happened:
Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method
I am attaching 3 files as zipped.
issue-open.py file can be used for reproducing the bug.
Please run
python issue-open.py
Please use demo.ipynb file for sending a request to model.
Environment:
issue.zip
The text was updated successfully, but these errors were encountered: