cuda-python icon indicating copy to clipboard operation
cuda-python copied to clipboard

cuda.core.system: add conveniences to convert between device types

Open mdboom opened this issue 1 month ago • 4 comments

This adds two convenience methods to convert between cuda.core.Device and cuda.core.system.Device.

I have a few design questions for this one:

  • Is the naming of Device.to_system_device and Device.to_cuda_device ok?
  • This could be a new type accepted by the constructor, e.g. cuda.core.Device(nvml_device), but that requires importing the other module from the constructor which could be a performance / cyclical import nightmare.

mdboom avatar Jan 16 '26 17:01 mdboom

Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

copy-pr-bot[bot] avatar Jan 16 '26 17:01 copy-pr-bot[bot]

/ok to test

mdboom avatar Jan 16 '26 17:01 mdboom

Doc Preview CI :---: |

:rocket: View preview at
https://nvidia.github.io/cuda-python/pr-preview/pr-1508/
|
https://nvidia.github.io/cuda-python/pr-preview/pr-1508/cuda-core/
|
https://nvidia.github.io/cuda-python/pr-preview/pr-1508/cuda-bindings/
|
https://nvidia.github.io/cuda-python/pr-preview/pr-1508/cuda-pathfinder/

|

Preview will be ready when the GitHub Pages deployment is complete.

github-actions[bot] avatar Jan 16 '26 18:01 github-actions[bot]

/ok to test

mdboom avatar Jan 16 '26 18:01 mdboom

/ok to test

mdboom avatar Jan 20 '26 18:01 mdboom

Doc Preview CI :---: Preview removed because the pull request was closed or merged.

github-actions[bot] avatar Jan 22 '26 12:01 github-actions[bot]