Choose which GPU to use on a multi-GPU system
Nobody has claimed this yet.
- Dominant language
- Cuda
- Stars
- 351
- Forks
- 84
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 35
Description
When you import gpu4pyscf, it creates CUDA streams on all visible CUDA devices.
There are cases where this is undesirable, for example when a multiple copies of a program are launched with MPI on one node, and each copy is meant to access only one device.
How can we make this configurable? Using CUDA_VISIBLE_DEVICES is not an option for me, because the same process that uses gpu4pyscf also uses other GPUs for other purposes.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read gpu4pyscf/config.py around lines 20-23, where importing the package creates streams on visible CUDA devices. Trace the stream setup and determine how a selected device could be configured without affecting other GPU use in the same process. Done means the package can target a chosen GPU or device set instead of always initializing all visible devices.
Written by the indexing model from the issue text.
Assessment
- Domain
- hpc
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100