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

Moving from pynvml to nvidia-ml-py #245

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions source/cloud/azure/azure-vm-multi.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ client = Client(cluster)


def get_gpu_model():
import pynvml
import nvidia-ml-py

pynvml.nvmlInit()
return pynvml.nvmlDeviceGetName(pynvml.nvmlDeviceGetHandleByIndex(0))
nvidia-ml-py.nvmlInit()
return nvidia-ml-py.nvmlDeviceGetName(nvidia-ml-py.nvmlDeviceGetHandleByIndex(0))
skirui-source marked this conversation as resolved.
Show resolved Hide resolved


client.submit(get_gpu_model).result()
Expand Down
2 changes: 1 addition & 1 deletion source/guides/azure/infiniband.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ Accept the default and allow conda init to run. Then start a new shell.
Create a conda environment (see [UCX-Py](https://ucx-py.readthedocs.io/en/latest/install.html) docs)

```shell
mamba create -n ucxpy {{ rapids_conda_channels }} {{ rapids_conda_packages }} ipython ucx-proc=*=gpu ucx ucx-py dask distributed numpy cupy pytest pynvml -y
mamba create -n ucxpy {{ rapids_conda_channels }} {{ rapids_conda_packages }} ipython ucx-proc=*=gpu ucx ucx-py dask distributed numpy cupy pytest nvidia-ml-py -y
mamba activate ucxpy
```

Expand Down
2 changes: 1 addition & 1 deletion source/guides/mig.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ GPU 0: NVIDIA A100-PCIE-40GB (UUID: GPU-84fd49f2-48ad-50e8-9f2e-3bf0dfd47ccb)

In the example case above the system has one NVIDIA A100 with 3 x 10GB MIG instances. In the next sections we will see how to use the instance names to startup a Dask cluster composed of MIG GPUs. Please note that once a GPU is partitioned, the physical GPU (named `GPU-84fd49f2-48ad-50e8-9f2e-3bf0dfd47ccb` above) is inaccessible for CUDA compute and cannot be used as part of a Dask cluster.

Alternatively, MIG instance names can be obtained programatically using [NVML](https://developer.nvidia.com/nvidia-management-library-nvml) or [PyNVML](https://github.com/gpuopenanalytics/pynvml). Please refer to the [NVML API](https://docs.nvidia.com/deploy/nvml-api/) to write appropriate utilities for that purpose.
Alternatively, MIG instance names can be obtained programatically using [NVML](https://developer.nvidia.com/nvidia-management-library-nvml) or [Nvidia-ml-py](https://github.com/conda-forge/nvidia-ml-py-feedstock). Please refer to the [NVML API](https://docs.nvidia.com/deploy/nvml-api/) to write appropriate utilities for that purpose.
skirui-source marked this conversation as resolved.
Show resolved Hide resolved

### LocalCUDACluster

Expand Down
6 changes: 3 additions & 3 deletions source/tools/dask-cuda.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ cluster = LocalCUDACluster()
client = Client(cluster)

def get_gpu_model():
import pynvml
import nvidia-ml-py

pynvml.nvmlInit()
return pynvml.nvmlDeviceGetName(pynvml.nvmlDeviceGetHandleByIndex(0))
nvidia-ml-py.nvmlInit()
return nvidia-ml-py.nvmlDeviceGetName(nvidia-ml-py.nvmlDeviceGetHandleByIndex(0))
skirui-source marked this conversation as resolved.
Show resolved Hide resolved


client.submit(get_gpu_model).result()
Expand Down