-
Notifications
You must be signed in to change notification settings - Fork 1k
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
CVXPY + GPU error #902
Comments
Cvxpy itself doesn’t use GPUs. The decision to use a GPU or not depends on the solver. I think SCS is the only cvxpy solver which has possible GPU support. To use that GPU support, you have to compile SCS from source (with an appropriate compiler flag). Sent with GitHawk |
Thanks for your response. I have already installed scs (pip install scs) if that's what you mean. I have also tried running the following (according to one of the users): python3 setup.py install --scs --gpu --int but it does not recognize --scs option. I don't know how to compile SCS from the source. Any hints? |
Back when I used SCS, “pip install scs” did not include GPU support. I had to download SCS source code (from its GitHub repository) and follow GPU-specific setup instructions. @bodono is seems that this is really an SCS question, rather than a cvxpy question. Do you agree? If so, can you take over this discussion, possibly on the SCS repo? Sent with GitHawk |
I just tested that and it works for me. First of all, uninstall scs (
note the gpu=True flag, do you see that?
what happens? |
Hi,
Now I want to use it also with cvxpy but a ModuleNotFoundError is raised with python not finding the module '_scs_gpu'.
Do you have another advice how to process this problem? Thanks |
Can you clean out the repo then paste in here what you see when you try to install? |
Namespace(blas64=False, extraverbose=False, float32=False, gpu=True, int32=False, scs=True) Installed /usr/local/lib/python3.6/dist-packages/scs-2.1.2-py3.6-linux-x86_64.egg Using /usr/local/lib/python3.6/dist-packages Using /usr/local/lib/python3.6/dist-packages |
This line: |
Yes I uninstalled it before, but only once. Additionally I removed the folder manually and now I get the following:
But I still get the ModuleNotFoundError when importing _scs_gpu |
Ok now what do you get when you |
EGG-INFO |
So it's installed, probably something is wrong with the way your python install is using the paths. You could try adding that directory to the |
Okay, after a short search on google I did it that way:
That doesn't change anything. I have to admit that I'm not a pro programmer yet. :'D |
You guys can keep talking, but this is not a cvxpy issue. |
This is still not a cvxpy issue but as I failed to find conversation/solutions elsewhere in the web despite this being a bit old question, here is my solution to it. Worked in Google Colab and might work in other venvs too with adjustments. In Colab Second row uninstalls scs that comes with cvxpy. Third row clones the scs-python to your Colab env and fourth row cds to the cloned directory and runs install. This approach sets PYTHONPATH correctly withing venv thus avoiding the problem in path that comes with using After that |
Hi, I am trying to work on Colab with GPU accelaration for cvxpy. Your reply excites me, but I tried, but not succeed. Do i need anything besides the four lines of commands? After running that I would have "Successfully installed scs-3.0.0", but when I run "import _scs_gpu", it still "ModuleNotFoundError: No module named '_scs_gpu'". Thank you so much! |
I tried this: pip uninstall scs -y which solved my problem |
Hi
I'm trying to run a simple optimization problem using CVXPY on GPU (on the cluster) but it gives the following error:
import _scs_gpu
ModuleNotFoundError: No module named '_scs_gpu'
Is there a specific module to import to get rid of this error? I could not find an example of running optimization on GPU using CVXPY online. This is the part of the code in which I have enabled the use of GPU.
X=prob.solve(solver=cp.SCS, gpu= True,use_indirect=True,eps=10(-8),verbose=False)**
Any help would be appreciated.
Thanks
The text was updated successfully, but these errors were encountered: