[FEA] Compute the desired number of GPU pytest workers from the available GPU memory
Open
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
Assessment
This issue has not been assessed yet.