Skip to content

Migrate from pynvml to cuda.core.system#1645

Open
mdboom wants to merge 6 commits into
rapidsai:mainfrom
mdboom:pynvml-to-cuda.core.system
Open

Migrate from pynvml to cuda.core.system#1645
mdboom wants to merge 6 commits into
rapidsai:mainfrom
mdboom:pynvml-to-cuda.core.system

Conversation

@mdboom

@mdboom mdboom commented Apr 15, 2026

Copy link
Copy Markdown

This migrates from pynvml to the new Cython/cybind-based bindings for NVML in cuda.core.system.

@copy-pr-bot

copy-pr-bot Bot commented Apr 15, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@mdboom mdboom force-pushed the pynvml-to-cuda.core.system branch from 60446f5 to 505f227 Compare April 15, 2026 17:30
@pentschev pentschev added 2 - In Progress Currently a work in progress improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Apr 15, 2026
@mdboom mdboom force-pushed the pynvml-to-cuda.core.system branch from 505f227 to 1306c08 Compare April 27, 2026 15:40
@pentschev

Copy link
Copy Markdown
Member

/ok to test 1306c08

@mdboom mdboom marked this pull request as ready for review May 19, 2026 13:06
@mdboom mdboom requested review from a team as code owners May 19, 2026 13:06
@mdboom mdboom requested a review from KyleFromNVIDIA May 19, 2026 13:06
@TomAugspurger

Copy link
Copy Markdown
Contributor

/ok to test 00453df

@TomAugspurger TomAugspurger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice overall.

IMO, the changes to dask_cuda.utils (removal of unpack_bitmask, change in return types) aren't worth trying to deprecate.

Comment thread dask_cuda/utils.py Outdated

@pentschev pentschev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, the changes to dask_cuda.utils (removal of unpack_bitmask, change in return types) aren't worth trying to deprecate.

Yes, absolutely not worth it, just removing them (as is being proposed) is enough.

@mdboom it seems you're still missing some cuda-core pinning changes:

-And since we're upgrading the version of cuda-core it would be nice to properly handle (i.e., remove) previous compatibility changes:

  • # Remove when cuda-core>=0.5
    import cuda.core.experimental
    Device = cuda.core.experimental.Device
  • @functools.lru_cache(maxsize=None)
    def get_cuda_core_version() -> packaging.version.Version:
    return packaging.version.parse(importlib.metadata.version("cuda-core"))
    @functools.lru_cache(maxsize=None)
    def CUDA_CORE_0_5_0():
    return get_cuda_core_version() >= packaging.version.parse("0.5.0")

As well as in the following test files:

Could you do that?

Comment thread dask_cuda/utils.py Outdated
@mdboom

mdboom commented May 19, 2026

Copy link
Copy Markdown
Author

/ok to test 97bfb94

@mdboom mdboom requested review from TomAugspurger and pentschev May 19, 2026 14:57
@pentschev

Copy link
Copy Markdown
Member

/ok to test 97bfb94

@wence-

wence- commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

/ok to test 3933543

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 - In Progress Currently a work in progress improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants