NVIDIA / NVIDIA/cudf

[FEA] Compute the desired number of GPU pytest workers from the available GPU memory

Open
#19,676 0 comments 0 reactions 1 assignee Claimed by @Matt711 View on GitHub
feature request Python
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

Update the relevant CI scripts to implement this proposal. We can probably augment it to run on the GPU with the most available memory.

```bash
# Use memory of device 0 to determine the number of pytest-xdist workers
gpu_mem_mib=$(nvidia-smi --query-gpu=memory.total --format=csv,noheader,nounits | head -n1)
gpu_mem_gb=$((gpu_mem_mib / 1024))
mem_gb_per_worker=3
num_workers=$((gpu_mem_gb / mem_gb_per_worker))
if [ $num_workers -lt 1 ]; then
num_workers=1
fi
```

_Originally posted by @bdice in https://github.com/rapidsai/cudf/pull/19355#discussion_r2200851267_

We can have the script return the device is and the number of purest workers

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.