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 2 weeks 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