pyscf / pyscf/gpu4pyscf

Choose which GPU to use on a multi-GPU system

Open
#435 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
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.

https://github.com/pyscf/gpu4pyscf/blob/f805329f11dcda25c27e1eedbb1bbb1890e45327/gpu4pyscf/__config__.py#L20-L23

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.