NVIDIA / NVIDIA/cuda-python

Deprecate `Device.set_current()`?

Open
#548 0 comments 1 reaction 1 assignee View on GitHub

@lijinf2 is already working on this.

Since May 29, 2026.

cuda.core enhancement P1 RFC
Dominant language
Cython
Stars
3.4k
Forks
329
Avg merge
1d 23h
Merged PRs (30d)
116

Description

I forgot to open an issue to track an offline discussion I had with @pciolkosz...

Currently, cuda.core diverges with cudax in a few places, and this is one of them. cuda.core focuses on enabling integration with existing Python projects, and having the cudart-like .set_current() method fills in the gap. However, the two projects also share many design principles, one of which is to favor explicitness, and therefore ideally we do not want any implicit/global states.

This issue tracks if there is any design opportunity to move away from the global device state, without breaking existing libraries. If such design exists, we should raise a deprecation warning asap while working toward the new design.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.