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

move pynvml install to setup.py #5840

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
hjson
ninja
numpy
nvidia-ml-py
packaging>=20.0
psutil
py-cpuinfo
Expand Down
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ def get_env_if_set(key, default: typing.Any = ""):
'triton': fetch_requirements('requirements/requirements-triton.txt'),
}

# Only install pynvml on nvidia gpus.
if torch_available and get_accelerator().device_name() == 'cuda' and not is_rocm_pytorch:
install_requires.append('nvidia-ml-py')

# Add specific cupy version to both onebit extension variants.
if torch_available and get_accelerator().device_name() == 'cuda':
cupy = None
Expand Down
Loading