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

[PEP508] Adding gpu or cuda specification in PEP 508 #581

Closed
Froskekongen opened this issue Feb 23, 2018 · 3 comments
Closed

[PEP508] Adding gpu or cuda specification in PEP 508 #581

Froskekongen opened this issue Feb 23, 2018 · 3 comments

Comments

@Froskekongen
Copy link

This is a use case related to conditional installs of versions of packages (e.g. tensorflow or pytorch) based on the presence of a cuda installation on the system.

The suggestion is to add a cuda_installed marker as part of the Environment Markers. This would enable systems like pipenv to install tensorflow on cpu systems and tensorflow_gpu on systems where cuda is installed.

See this issue for more details.

@brettcannon
Copy link
Member

@rbtcollins

@AlJohri
Copy link

AlJohri commented Feb 27, 2018

This would be great! I was just about to ask for something like this as well. I'm already using the markers to switch packages between platforms. Adding gpu_enabled or perhaps even cuda_version would be super helpful.

Using the Pipfile, I'm currently switching between versions of PyTorch like so. I manually switch out the gpu version of pytorch when I'm on the GPU enabled machine.

# CPU only versions for both Darwin and Linux
"d7d2ba6" = {file = "http://download.pytorch.org/whl/torch-0.3.1-cp36-cp36m-macosx_10_7_x86_64.whl", platform_system = "== 'Darwin'"}
"7fdd3bd" = {file = "http://download.pytorch.org/whl/cpu/torch-0.3.1-cp36-cp36m-linux_x86_64.whl", platform_system = "== 'Linux'"}

# GPU (Cuda 8) version for Linux
# "7fdd3bd" = {file = "http://download.pytorch.org/whl/cu80/torch-0.3.1-cp36-cp36m-linux_x86_64.whl", platform_system = "== 'Linux'"}

@brettcannon
Copy link
Member

@Froskekongen Now that I think about it, this would best be brought up on distutils-sig or pypa-dev for discussion, so I'm going to close this as we try to keep issues here as actual technical issues with PEPs and not feature requests.

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

3 participants