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

gpu support from pip install version #2

Open
szrlee opened this issue Apr 12, 2018 · 1 comment
Open

gpu support from pip install version #2

szrlee opened this issue Apr 12, 2018 · 1 comment

Comments

@szrlee
Copy link

szrlee commented Apr 12, 2018

When I use pip to install scs and test with solve_random_cone_prob_gpu.py

~/scs-python$ python test/solve_random_cone_prob_gpu.py 
Traceback (most recent call last):
  File "test/solve_random_cone_prob_gpu.py", line 75, in <module>
    main()
  File "test/solve_random_cone_prob_gpu.py", line 14, in main
    solve_feasible()
  File "test/solve_random_cone_prob_gpu.py", line 34, in solve_feasible
    sol_i = scs.solve(data, K, gpu=True, **params)
  File "/home/xxxx/anaconda3/lib/python3.6/site-packages/scs/__init__.py", line 56, in solve
    import _scs_gpu

Must I install scs-python from source if I want the GPU feature?
Another question, if possible to be answered, is that when I use GPU version pytorch or tensorflow combining with this GPU-version scs, will there be some additional data transferring costs? I suppose not since the data are already loaded to GPU.

Thanks a lot for attention!

@bodono
Copy link
Owner

bodono commented Apr 16, 2018

Currently it's not automatically built when installing via pip since not everyone has a GPU and CUDA installed, though we could add it inside a try-except block.

Not sure what you mean with respect to pytorch / TF, but generally speaking SCS will only transfer the main data matrix to the GPU once at the very start of the run.

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